This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# installation | |
# $ wget https://gist.githubusercontent.com/iuridiniz/1be809ac67a6884bfd5a5cbacbe87a22/raw/qterminal-drop-loop.sh -O ~/.local/bin/qterminal-drop-loop.sh | |
# $ chmod +x ~/.local/bin/qterminal-drop-loop.sh | |
# $ wget https://gist.githubusercontent.com/iuridiniz/1be809ac67a6884bfd5a5cbacbe87a22/raw/qterminal-drop-loop.sh.desktop -O .config/autostart/qterminal-drop-loop.sh.desktop | |
while sleep 1; do | |
qterminal --drop || exit $? | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
RUN \ | |
apk update && \ | |
apk add \ | |
g++ \ | |
gzip \ | |
make \ | |
ncurses-dev \ | |
ncurses-static \ | |
openssl-dev \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
PYTHON="/usr/bin/env python2" | |
BASEDIR=$(cd -P "`dirname "$0"`" && pwd) | |
SOURCE="${BASEDIR}/src" | |
OUTPUT="${BASEDIR}/app" | |
tmpfile=$(mktemp --suffix .zip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lenovo ThinkPad Tablet | |
ATTR{idVendor}=="17ef", ATTR{idProduct}=="76e8", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" | |
ATTR{idVendor}=="17ef", ATTR{idProduct}=="76e9", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/iuri/.local/share/wineprefixes/cs1.6/drive_c/Program\ Files\ \(x86\)/Counter-Strike/ | |
WINEPREFIX=/home/iuri/.local/share/wineprefixes/cs1.6/ exec \ | |
wine ./hl.exe \ | |
-steam \ | |
-game cstrike \ | |
-noipx \ | |
-nojoy \ | |
-noforcemparms \ | |
-noforcemaccel \ | |
-w 1280 -h 720 -forceres -window \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
waittcpport () | |
{ | |
PORT=${1}; | |
SERVER=${2:-'localhost'} | |
WAIT=${3:-'2'}; | |
[ -z "$PORT" ] && return 7; | |
for i in `yes 0.1| head -n ${WAIT}0`; | |
do | |
nc -z "$SERVER" "$PORT"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import sys | |
import psycopg2 | |
import psycopg2.extras | |
conn = psycopg2.connect('dbname=psycopg2_test user=iuri', | |
connection_factory=psycopg2.extras.LogicalReplicationConnection) | |
cur = conn.cursor() | |
try: | |
# test_decoding produces textual output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# README |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadScript(src, cb) { | |
var script = document.createElement('script'); | |
script.async = true; | |
script.src = src; | |
script.onerror = function() { | |
cb(new Error("Failed to load" + src)); | |
}; | |
script.onload = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
libc = ctypes.CDLL('libc.so.6') | |
tzname = (ctypes.c_char_p * 2).in_dll(libc, 'tzname') | |
for n in tzname: print(n) |