Skip to content

Instantly share code, notes, and snippets.

@zingmars
zingmars / tinc.MD
Last active March 14, 2024 12:02
tinc VPN setup instructions on Windows and Linux

Tinc setup instructions for Ubuntu and Windows. Based on 1 2.

Start here.

  1. sudo apt-get install -y build-essential libncurses5-dev libreadline6-dev libzlcore-dev zlib1g-dev liblzo2-dev libssl-dev
  2. Download and install tinc
    2.1. Download the latest tinc 1.1 source package ( current: wget https://www.tinc-vpn.org/packages/tinc-1.1pre16.tar.gz -O tinc.tar.gz)
    • tar -xf tinc.tar.gz --one-top-level --strip-components=1
    • cd tinc
    • ./configure
@peteristhegreat
peteristhegreat / qt-setup-not-enough-disk-space.md
Last active March 12, 2024 14:50
qt setup "not enough disk space to store temporary files" windows
@orionll
orionll / Typeclasses.scala
Last active June 9, 2020 12:46
Typeclass example
// Тайпкласс Animal (для полноты картины добавил метод hello, иначе был бы совсем тривиальный пример)
// Animal полностью абстрагирован от низлежашего типа A
trait Animal[A] {
def word: String
def talk() { println(word) }
def hello(a: A): String
}
// Обертка над тайпклассом Animal, чтобы можно было писать cat.hello, а не animal.hello(cat)
// AnimalOps полностью дублирует методы, определённые в Animal, но также может содержать еще и дополнительные методы.
@kbrougham
kbrougham / Vaccinator No-Wait
Last active November 25, 2023 18:12
Vaccinator No-Wait Specific Toggle Script
//The gist of this script is: we have three states. Bullet selected, explosive selected, and fire selected.
//When bullet is selected, we make the 'go to bullet' button do nothing, whereas the other two advance one, and update their current state.
//This way, you can continually hit a key, which will advance state, until you hit your current desired state, and it will stop advancing.
//We always start on spawn with bullet, so we set bullet blank, as to not change resist type
alias +go_to_bullet;
alias -go_to_bullet "-reload";
//Since we start on bullet, going to explosive is one use
alias +go_to_explosive "bullet_to_explosive";
@willurd
willurd / web-servers.md
Last active May 6, 2024 13:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@