Skip to content

Instantly share code, notes, and snippets.

View abonec's full-sized avatar

Alexander abonec

  • Russian, Moscow
View GitHub Profile
abonec@abonec-System-Product-Name:~/vim$ make
Starting make in the src directory.
If there are problems, cd to the src directory and run make there
cd src && make first
make[1]: Entering directory `/home/abonec/vim/src'
mkdir objects
CC="gcc -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 " srcdir=. sh ./osdef.sh
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pixman-1 -
@abonec
abonec / port_forwarding.conf
Created March 10, 2014 13:09
Port forwarding for upstart via autossh and ssh
description "autossh daemon"
start on net-device-up IFACE=eth0
stop on runlevel [01S6]
respawn
respawn limit 5 60 # respawn max 5 times in 60 seconds
script
export AUTOSSH_PIDFILE=/var/run/autossh.pid
#!/usr/bin/env ruby
require "openssl"
class BF < Struct.new(:key, :pad_with_spaces)
def encrypt(str)
cipher = OpenSSL::Cipher.new('bf-ecb').encrypt
if pad_with_spaces
str += " " until str.bytesize % 8 == 0
cipher.padding = 0
+---------------------------------------------------------+
|---------------------------------------------------------|
+---------------------------------------------------------+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
def iterate_over_pages pattern
page = 1
loop do
url = pattern.gsub(/%page%/, page.to_s)
break unless yield url, page
page += 1
end
end
iterate_over_pages("http://leplay.com.ua/category/pic/page/%page%/") do |url, page|
10-07 20:05:57.951: E/AndroidRuntime(14890): FATAL EXCEPTION: Thread-2596
10-07 20:05:57.951: E/AndroidRuntime(14890): Process: com.snegoffon.corruption, PID: 14890
10-07 20:05:57.951: E/AndroidRuntime(14890): java.lang.OutOfMemoryError
10-07 20:05:57.951: E/AndroidRuntime(14890): at java.lang.String.<init>(String.java:255)
10-07 20:05:57.951: E/AndroidRuntime(14890): at libcore.io.IoUtils$FileReader.toString(IoUtils.java:272)
10-07 20:05:57.951: E/AndroidRuntime(14890): at libcore.io.IoUtils.readFileAsString(IoUtils.java:114)
10-07 20:05:57.951: E/AndroidRuntime(14890): at com.android.org.conscrypt.CertPinManager.readPinFile(CertPinManager.java:111)
10-07 20:05:57.951: E/AndroidRuntime(14890): at com.android.org.conscrypt.CertPinManager.rebuild(CertPinManager.java:85)
10-07 20:05:57.951: E/AndroidRuntime(14890): at com.android.org.conscrypt.CertPinManager.<init>(CertPinManager.java:49)
10-07 20:05:57.951: E/AndroidRuntime(14890): at com.android.org.conscrypt.TrustManagerImpl.<init>(TrustManagerImpl.ja
[phonegap] executing 'cordova build ios'...
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/icon-60.png
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/[email protected]
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/[email protected]
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/icon-76.png
[phonegap] executing 'cordova build ios --device'...
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/icon-60.png
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/[email protected]
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/[email protected]
cp: no such file or directory: /Users/programmer/projects/phonegap/pristine/jscore/phonegap/res/ios/icon-76.png
require 'minitest/autorun'
module BracketTester
module_function
def balanced?(str)
brackets = 0
str.each_char do |char|
if char == '('
brackets += 1
else
LeftEdge = 1780
RightEdge = 5576
TopEdge = 1635
BottomEdge = 4431
FingerLow = 25
FingerHigh = 30
MaxTapTime = 180
MaxTapMove = 241
MaxDoubleTapTime = 180
SingleTapTimeout = 180