This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install Ruby | |
pkg_add ruby | |
- I chose 2.3.0 | |
2. Install gems | |
pkg_add ruby-gems | |
3. Add ~/.gem/ruby/2.3/bin to PATH | |
PATH="~/.gem/ruby/2.3/bin:"$PATH | |
4. Install bundle | |
gem23 install --user-install bundler | |
5. Install nokogiri (or run into problems installing rails) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'logger' | |
require 'pdf-reader' | |
#Usage | |
# [1] Create a new directory and copy pdf2txt.rb in this directory. | |
# [2] Insert also your pdf files in this directory. | |
# For every pdf file in this directory, this script will create a new textfile extracting the text from your original pdf file. | |
# File paths nad Log paths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Root | |
sudo su | |
# Download NMON archive | |
cd /tmp | |
wget http://nmon.sourceforge.net/docs/MPG_nmon_for_Linux_14a_binaries.zip | |
# Install unzip if you don't have | |
yum install unzip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
require 'date' | |
pos = DATA.pos | |
cday=DateTime.now.strftime("%d") | |
ddata=DATA.readline.to_s | |
pday=ddata.split(";")[0] | |
if cday == pday | |
count = ddata.split(";")[1].to_i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require './lib/diakonos/version.rb' | |
require 'fileutils' | |
require 'pp' | |
require 'rbconfig' | |
module Diakonos | |
class Installer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
// This build system will build your cs file to exe file and will run it | |
"cmd": ["del ${file/\\.cs/\\.exe/} 2>NUL", "& csc /nologo /out:${file/\\.cs/\\.exe/} $file", "& ${file/\\.cs/\\.exe/}"], | |
"file_regex": "^(...*?)[(]([0-9]*),([0-9]*)[)]", | |
// By default csc is not in your PATH, so add it to your path | |
// or uncomment "path" and check that it has correct value | |
//"path": "C:/Windows/Microsoft.NET/Framework64/v4.0.30319/", | |
"shell": true, // Without this sublime has hard times to parse "&" in out command line | |
"selector": "source.cs" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'net/http' | |
require 'net/https' | |
module MEGA | |
class Request | |
EAGAIN = '-3' | |
API_URL = 'https://eu.api.mega.co.nz/cs' | |
@@counter = rand(0x100000000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\vtypal\GitHub\MEGA.rb [master +0 ~2 -0]> ruby .\client.rb | |
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect': SSL_connect returned=1 e | |
rrno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL | |
::SSL::SSLError) | |
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `block in connect' | |
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in `timeout' | |
from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in `timeout' | |
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:799:in `connect' | |
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in `do_start' | |
from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in `start' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#Adds a global syslog server. Up to two global servers can be defined. They | |
#will receive logs for startups and exits, as well as all logs from proxies | |
#configured with "log global". An optional level can be specified to filter | |
#outgoing messages. By default, all messages are sent. | |
#An IPv4 address optionally followed by a colon and a UDP port. If | |
#no port is specified, 514 is used by default (the standard syslog port). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 notice | |
maxconn 50000 | |
daemon | |
stats socket /tmp/proxystats level admin | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull |
NewerOlder