I hereby claim:
- I am zemlanin on github.
- I am zem (https://keybase.io/zem) on keybase.
- I have a public key whose fingerprint is 69AE 19AE 14E2 31E1 E727 CD27 B3A7 3ED8 9342 526F
To claim this, I am signing this object:
# extra short | |
M=k=L=0 | |
while k<1e6: | |
n=k=k+1;l=1 | |
while n>1:n=[n/2,3*n+1][n%2];l+=1 | |
if l>L:M,L=k,l | |
print M | |
# short and fast | |
r={1:1};k=L=M=0 |
# send message to your devices via pushover.net API | |
# add next two or three lines to .bashrc/.zshrc to use this script | |
# export PUSHOVER_APP="your pushover.net app token" | |
# export PUSHOVER_USER="your pushover.net user key" | |
# # optional: | |
# export PUSHOVER_DEVICE="default device" | |
# USAGE: push <message> [-d=<device>] | |
# OPTIONS: |
# send yo to your devices via Yo API | |
# add next line to .bashrc/.zshrc to use this script | |
# export YO_APP="your justyo.co app token" | |
# USAGE: yop [link] | |
__yop(){ | |
local link=$1 | |
local api_url="http://api.justyo.co/yoall/" |
I hereby claim:
To claim this, I am signing this object:
Solutions for regex.alf.nu (easy mode)
Warmup (207)
foo
Anchors (208)
k$
Ranges (202)
import itertools, string, operator, requests | |
cypher = map(int, requests.get('https://projecteuler.net/project/cipher1.txt').text.split(',')) | |
for pwd in itertools.product(string.ascii_lowercase, repeat=3): | |
phrase = ''.join(itertools.imap(lambda x,y: chr(operator.xor(x, y)), cypher, itertools.cycle(map(ord, pwd)))) | |
if 'the' in phrase.lower() and 'and' in phrase.lower() and ' ' in phrase: | |
print phrase, '\n|\n+->\t', ''.join(pwd), '\n' |
# Генерируем цвет фона prompt'а, основываясь на md5-сумме hostname (только первые 2 шестнадцатеричные цифры) | |
export TERM=xterm-256color | |
__colorcode=$( | |
( | |
echo "ibase=16"; hostname | md5sum | cut -c1-2 | tr "[:lower:]" "[:upper:]" | |
) | bc | awk '{printf "[48;5;%dm", $1}' # Перед "[" стоит ESC-символ, который не отображается в браузере | |
) |
# add this file to your ~/.zshrc file and restart zsh | |
# or just run "curl https://gist.github.com/zemlanin/5322437/raw/p.sh >> ~/.zshrc; exec zsh" | |
# | |
# input: | |
# p 2+4 4.0/3 _0+_1 | |
# | |
# and get output like: | |
# _0> 6 | |
# _1> 1.3333333333333333 | |
# _2> 7.333333333333333 |
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<!-- | |
1. Download the Symbola font: | |
http://users.teilar.gr/~g1951d/Symbola707.zip | |
2. unzip the file and put Symbola.ttf (and any of the other fonts that strike your fancy) | |
in your ~/.fonts/ directory | |
3. run `fc-cache -f`. You can check to make sure the new fonts |
.DS_Store |