Skip to content

Instantly share code, notes, and snippets.

https://docs.google.com/presentation/d/1InBQtd7hPJVYbuOExxmiWCMAbA-SNqUvir4jbFSgvHM/edit?usp=sharing
@Pawka
Pawka / run.php
Created May 22, 2017 18:50
Check if translation exists with Symfony translation component
<?php
require 'vendor/autoload.php';
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\MessageSelector;
use Symfony\Component\Translation\Loader\ArrayLoader;
/**
@Pawka
Pawka / dump.py
Created May 12, 2017 16:09
Kindervibe photos downloader
import argparse
import datetime
import json
import requests
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--token", required=True,
help="Kindervibe auth token")
parser.add_argument("--pk", required=True,
@Pawka
Pawka / gist:e966cdc6f8de5fa78d0af6fde1d86f8b
Last active November 16, 2016 13:36
BuildStuff 2016 Wix challenge links.
U2FsdGVkX1/jNm5SuZ6hy2yEoQ3sMnb8ZuSi93KkOYD4pjasBLcIk5VYxNkEZ47H
ZklfNrhj8ZiaZodPmLQ5oWShrMBYSy/kXC+Q+SKKFJp3VxWKKlaLT7S8hdgWvtRq
E1RrpbV+AmBWk3dVUHaK+9MXNX3Ctc/bSrwcegUfx1kG3c8Bbf8DYmZdfPqIKJ2F
d7rgVSFnJ9NoT6CvLYPyHyb+uXAQ9y1lMG6no0aOYamP068ChsjK0M4mKnu9Q5fV
EJ/FI8HrYIll1sIO7oDh20APaLpp9Uxre1u3M9PC+wbZ4pr9ZLzd2YF0b93R7XuE
5jLUwt7PdrCcwbsgbJSu1vDykDNj4P5SzvZlMerTvVwpQ0DEMmMF7Fll3IOd1Dzl
3v96M4wk877hzrKscKLChRhhu8npTalHB1JXxKPHzqI4xlBogNs5rI/vM8lgJ7vz
UJ+bsaizK7NGs6QB313MiOxH4tAIZWFavuCzSEzIYu1DxXgFX9JkT/2wC1CIK5SR
d+KZ1PUZf0rNJe0i7ERMNtnsZr0TKVvV0PASPg0v2ROSwU5tiRDShzgEJs7+WyKK
5EfHW/dnLwlPpptNIhyozA6t4i60MP/HVGvdESkmT9bqsl0a2ejZXiwGfuvWfFBL
64.242.88.10 - - [07/Mar/2004:16:05:49 -0800] "GET /twiki/bin/edit/Main/Double_bounce_sender?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12846
64.242.88.10 - - [07/Mar/2004:16:06:51 -0800] "GET /twiki/bin/rdiff/TWiki/NewUserTemplate?rev1=1.3&rev2=1.2 HTTP/1.1" 200 4523
64.242.88.10 - - [07/Mar/2004:16:10:02 -0800] "GET /mailman/listinfo/hsdivision HTTP/1.1" 200 6291
64.242.88.10 - - [07/Mar/2004:16:11:58 -0800] "GET /twiki/bin/view/TWiki/WikiSyntax HTTP/1.1" 200 7352
64.242.88.10 - - [07/Mar/2004:16:20:55 -0800] "GET /twiki/bin/view/Main/DCCAndPostFix HTTP/1.1" 200 5253
64.242.88.10 - - [07/Mar/2004:16:23:12 -0800] "GET /twiki/bin/oops/TWiki/AppendixFileSystem?template=oopsmore&param1=1.12&param2=1.12 HTTP/1.1" 200 11382
64.242.88.10 - - [07/Mar/2004:16:24:16 -0800] "GET /twiki/bin/view/Main/PeterThoeny HTTP/1.1" 200 4924
64.242.88.10 - - [07/Mar/2004:16:29:16 -0800] "GET /twiki/bin/edit/Main/Header_checks?topicparent=Main.ConfigurationVariables HTTP/1.1" 401 12851
64.242.88.10 - - [07/Mar/2004:16:3
@Pawka
Pawka / gist:22b3d8d593d742a6724b
Created June 11, 2014 09:48
vim php getter setter plugin template
" php-getter-setter {
" Templates needs to be set before plugin load
let b:phpgetset_setterTemplate =
\ " \n" .
\ " /**\n" .
\ " * Set %varname%\n" .
\ " *\n" .
\ " * @param mixed $%varname%\n" .
\ " */\n" .
\ " public function %funcname%($%varname%)\n" .
@Pawka
Pawka / gist:4563176
Last active December 11, 2015 06:59
Pietums cepelinai
echo `curl --silent -A "Mozilla/5.0" http://www.cepelinai.eu/lt/uzsakymas | grep "product-name" | sed 's/<[^>]*>//g' | shuf -n 1` && echo `curl --silent -A "Mozilla/5.0" http://www.cepelinai.eu/lt/uzsakymas | grep \"order_sauce\" -A 5 | grep option | sed 's/<[^>]*>//g' | shuf -n 1`
@Pawka
Pawka / gist:1381836
Created November 21, 2011 06:31
Add display mode.
#!/bin/bash
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA1 1920x1080_60.00
xrandr --output VGA1 --mode 1920x1080_60.00