Skip to content

Instantly share code, notes, and snippets.

View resure's full-sized avatar

Gadzhi Gadzhiev resure

View GitHub Profile
00000000 33 c0 8e d0 bc 00 7c 8e c0 8e d8 be 00 7c bf 00 |3.....|......|..|
00000010 06 b9 00 02 fc f3 a4 50 68 1c 06 cb fb b9 04 00 |.......Ph.......|
00000020 bd be 07 80 7e 00 00 7c 0b 0f 85 0e 01 83 c5 10 |....~..|........|
00000030 e2 f1 cd 18 88 56 00 55 c6 46 11 05 c6 46 10 00 |.....V.U.F...F..|
00000040 b4 41 bb aa 55 cd 13 5d 72 0f 81 fb 55 aa 75 09 |.A..U..]r...U.u.|
00000050 f7 c1 01 00 74 03 fe 46 10 66 60 80 7e 10 00 74 |....t..F.f`.~..t|
00000060 26 66 68 00 00 00 00 66 ff 76 08 68 00 00 68 00 |&fh....f.v.h..h.|
00000070 7c 68 01 00 68 10 00 b4 42 8a 56 00 8b f4 cd 13 ||h..h...B.V.....|
00000080 9f 83 c4 10 9e eb 14 b8 01 02 bb 00 7c 8a 56 00 |............|.V.|
00000090 8a 76 01 8a 4e 02 8a 6e 03 cd 13 66 61 73 1c fe |.v..N..n...fas..|
#include <iostream>
#include <locale>
#include <string>
#include <set>
#include <algorithm>
#include <iterator>
#include <fstream>
#define V true
puts :hi
@resure
resure / rails.js
Created May 8, 2011 19:07
rails.js
(function() {
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
function isEventSupported(eventName) {
var el = document.createElement('div');
eventName = 'on' + eventName;
var isSupported = (eventName in el);
if (!isSupported) {
el.setAttribute(eventName, 'return;');
isSupported = typeof el[eventName] == 'function';
set :user, 'resure'
set :domain, '42miles.net'
set :application, "milesmain"
set :repository, "[email protected]:/home/resure/repositories/milesmain.git"
set :deploy_to, "/home/resure/sites/42miles.net"
set :rvm_path, "/home/resure/.rvm/gems/ruby-1.9.2-p180"
set :default_environment, {
#! /bin/sh
EXEC_PATH="/usr/local/nginx/sbin/nginx"
case "$1" in
start)
echo "Starting NginX"
start-stop-daemon --start --exec $EXEC_PATH
;;
stop)
#include <iostream>
// Максимальная длина строки
#define STRLEN 256
using namespace std;
bool is_number(int ch)
{
// Магия
@resure
resure / alp-x1-30.cpp
Created June 17, 2011 16:26
АЯП, тридцатая лаба первого усложненного
#include <iostream>
#include <locale.h>
#include <ctype.h>
#define V true
#define CAPACITY 64
using namespace std;
#!/usr/bin/ruby
# encoding: utf-8
PNAME = 'Саркис'
r = '================================='
r += '================================='
class Human
def initialize(name)
@resure
resure / check.py
Created July 8, 2011 14:06
.su check (from habrahabr.ru)
#!/usr/bin/env python
import string
import urllib
l = string.letters[:26] + string.digits
url = 'http://www.reg.ru/newdomain/check_available?domain=%s%s.su'
get = lambda y, x: urllib.urlopen(url % (y, x)).read()