Skip to content

Instantly share code, notes, and snippets.

Igor Šarčević shiroyasha

Block or report user

Report or block shiroyasha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shiroyasha
shiroyasha / gist:5481111
Created Apr 29, 2013
Sublime better monokai highlight
View gist:5481111
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai Bright</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@shiroyasha
shiroyasha / sources.list
Last active Aug 29, 2015
Fast ubuntu mirrors
View sources.list
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
View gist:5df7355ef99f979814f7
class Animal
def initialize(name)
@name = name
end
def to_s
@name
end
end
View hb.py
#!/usr/bin/python
import curses
import random
stdscr = curses.initscr()
curses.noecho()
curses.cbreak()
stdscr.keypad(1)
curses.halfdelay(1)
@shiroyasha
shiroyasha / dog.rb
Created Feb 16, 2016
Method tracer for Ruby classes
View dog.rb
class Dog
attr_writer :name
def initialize(name)
@name = name
end
def bark
puts "patrick"
end
View alpine-install-thrift
cd /tmp
apk --update add libstdc++ libgcc
wget https://s3-us-west-1.amazonaws.com/renderedtext-alpine-packages/thrift-0.9.3.tar.gz
tar xvzf thrift-0.9.3.tar.gz
mv thrift/thrift /usr/bin
mv thrift/thrift-0.9.3 /usr/lib/erlang/lib
rm -rf thrift-0.9.3.tar.gz
View node-6-3-1.sh
#/bin/bash
set -ex
keys=(
9554F04D7259F04124DE6B476D5A82AC7E37093B
94AE36675C464D64BAFA68DD7434390BDBE9B9C5
0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93
FD3A5288F042B6850C66B31F09FE44734EB7990E
71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
View retry.sh
function retry {
local n=1
local max=5
local delay=15
while true; do
"$@" && break || {
if [[ $n -lt $max ]]; then
((n++))
echo "Command failed. Attempt $n/$max:"
sleep $delay;
View ctags
cd /tmp
echo "Installing GCC and frieds"
sudo apt install \
gcc make \
pkg-config autoconf automake \
python3-docutils \
libseccomp-dev \
libjansson-dev \
View ctags.sh
cd /tmp
echo "Installing GCC and frieds"
sudo apt-get update -y
sudo apt -y install \
gcc make \
pkg-config autoconf automake \
python3-docutils \
libseccomp-dev \
You can’t perform that action at this time.