Skip to content

Instantly share code, notes, and snippets.

View darky's full-sized avatar
🟪

Vladislav Botvin darky

🟪
  • Moscow
  • 15:23 (UTC +03:00)
View GitHub Profile
@gaspard
gaspard / gist:1087380
Created July 17, 2011 09:02
Simple C++ class with C interface for Luajit ffi bindings
// g++ simple.cpp -shared -o libsimple.dylib
#include <stdio.h>
class Simple {
int id_;
public:
Simple(int id);
~Simple();
@afriza
afriza / redsocks.conf
Created July 21, 2011 13:42
Setup iptables for RedSocks in OpenWRT
base {
// debug: connection progress & client list on SIGUSR1
log_debug = on;
// info: start and end of client session
log_info = on;
/* possible `log' values are:
* stderr
* file:/path/to/file
@mattn
mattn / dump.vim
Created December 6, 2011 13:18 — forked from ynkdir/dump.vim
google-calendar-holiday
scriptencoding utf-8
let s:calendar_list = [
\ ['Australian Holidays', 'en.australian#holiday@group.v.calendar.google.com'],
\ ['Austrian Holidays', 'en.austrian#holiday@group.v.calendar.google.com'],
\ ['Brazilian Holidays', 'en.brazilian#holiday@group.v.calendar.google.com'],
\ ['Canadian Holidays', 'en.canadian#holiday@group.v.calendar.google.com'],
\ ['China Holidays', 'en.china#holiday@group.v.calendar.google.com'],
\ ['Christian Holidays', 'en.christian#holiday@group.v.calendar.google.com'],
\ ['Danish Holidays', 'en.danish#holiday@group.v.calendar.google.com'],
@ifesdjeen
ifesdjeen / wrap_fn.clj
Created May 22, 2012 11:36
Wrapping functions in Clojure
(defn wrap-fn
"Wrap or replace some function with your own function"
[qualifier wrapper]
(alter-var-root
qualifier
(fn [original-fn]
(fn [& caller-arguments]
(wrapper caller-arguments original-fn)))))
;; Replace your function implementation:
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 27, 2024 16:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@venomjke
venomjke / ddos.js
Created November 20, 2012 09:19
Утилита для организации DDoS на базе Node.js
var request = require('request'),
util = require('util'),
fs = require('fs'),
events = require('events');
var attackUrl = 'http://ispi.ru/';
var proxyLists = [];
var proxyFile = __dirname+'/proxylist.txt';
var e = new events.EventEmitter;
@totherik
totherik / gist:3a4432f26eea1224ceeb
Last active June 16, 2024 13:42
v8 --allow-natives-syntax RuntimeFunctions
Per https://code.google.com/p/v8/codesearch#v8/trunk/src/runtime.cc
%CreateSymbol
%CreatePrivateSymbol
%CreateGlobalPrivateSymbol
%NewSymbolWrapper
%SymbolDescription
%SymbolRegistry
%SymbolIsPrivate
@jacobsalmela
jacobsalmela / ssh-in-single-user-mode.sh
Created May 13, 2014 17:51
Enables outbound SSH in Single-user Mode on OS X
#!/bin/bash
# https://github.com/jacobsalmela
# Enables outbound SSH in single-user mode on OS X
# Save this file as /var/root/.profile and boot into single-user mode
# Last tested on 10.9.2
#----------VARIABLES---------
# Manually set ethernet device ID
@mikkeloscar
mikkeloscar / guide.md
Created June 14, 2014 20:44
Setup armv7h chroot under x86_64 host (Archlinux/Archlinuxarm biased)

Setup armv7h chroot under x86_64 host (Archlinux/Archlinuxarm biased)

Simple way to setup an arm chroot for building packages for your arm devices. This is an alternative to cross-compiling where you are limited to only linking against the libs in your toolchain.

Setup chroot-fs

You can store the chroot wherever you like. I choose to store it in a disk-image which I mount to my filesystem.