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
#!/usr/bin/env nix-shell | |
#!nix-shell -i bash -p bash freerdp3 gnugrep chromedriver jq | |
# Used for unattended (afk) logins | |
# My usecase: | |
# when machine locks its screen, | |
# there is no way to paste to paste longer password to login, | |
# so just close it and run this script again | |
# | |
# Conditions: |
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
#!/usr/bin/env bash | |
curl -s -X POST \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ | |
-H "Travis-API-Version: 3" \ | |
-H "Authorization: token $2" \ | |
-d "{\"quiet\": true}" \ | |
https://api.travis-ci.org/job/$1/debug |
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
#!/usr/bin/env bash | |
set -e | |
state="$(xrandr)"; | |
outputs="$(awk '{if ($2 == "connected") print $1}' <<< "$state")" | |
function getModes() { | |
awk -v output=$1 '{if ($1 == output) {getline; while ($0 ~ /^\ \ /) {print $1; getline;}}}' <<< "$state" | |
} |
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 sys | |
import logging | |
import tty | |
import termios | |
import argparse | |
import pychromecast | |
import threading | |
from pychromecast.controllers.youtube import YouTubeController | |
from urllib.parse import urlparse | |
from urllib.parse import parse_qs |
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
const PQ = require('p-q'); | |
// so many parallel promises should run at the same time | |
const concurrency = 3; | |
// simulate work with delay function | |
function delay(times, ms = 1000) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, times * ms); | |
}); |
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
#!/usr/bin/env python3 | |
import subprocess | |
import re | |
mouselocation = subprocess.check_output(['xdotool', 'getmouselocation']).decode('utf-8') | |
mouse = { | |
'x': int(mouselocation.split(' ')[0].split(':')[1]), | |
'y': int(mouselocation.split(' ')[1].split(':')[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
async function test () { | |
let prefix = 'my-super-dooper-user-prefix'; | |
await add(prefix, 'silver_hook', -2.6); | |
await add(prefix, 'Predkambrij', -2); | |
await add(prefix, 'offlinehacker', -200); | |
await add(prefix, 'offlinehacker', -200); | |
await add(prefix, 'offlinehacker', 2); | |
let transactions = await list(prefix, 'offlinehacker'); | |
let balance = await get(prefix, 'offlinehacker'); | |
console.log({transactions, balance}) |
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
# not to be used | |
{ pkgs ? import <nixpkgs> {} }: | |
pkgs.runCommand "vivaldi-with-flash" { | |
buildInputs = [ pkgs.makeWrapper ]; | |
} '' | |
mkdir -p $out/bin | |
makeWrapper ${pkgs.vivaldi}/bin/vivaldi $out/bin/vivaldi \ | |
--add-flags "--ppapi-flash-path=${pkgs.flashplayer}/lib/mozilla/plugins/libflashplayer.so" | |
'' |
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
{ | |
name = "armv7l-hf-multiplatform-custom"; | |
kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. | |
kernelHeadersBaseConfig = "multi_v7_defconfig"; | |
kernelBaseConfig = "multi_v7_defconfig"; | |
kernelArch = "arm"; | |
kernelDTB = true; | |
kernelAutoModules = false; | |
uboot = null; | |
kernelTarget = "zImage"; |
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
root@A20-OLinuXino:~/workarea/nix-1.11.4# make -j2 | |
make: Warning: File 'config.h.in' has modification time 210856510 s in the future | |
GEN doc/manual/manual.xmli | |
GEN config.h | |
doc/manual/local.mk:21: recipe for target 'doc/manual/manual.xmli' failed | |
make: *** [doc/manual/manual.xmli] Error 1 | |
make: *** Waiting for unfinished jobs.... | |
root@A20-OLinuXino:~/workarea/nix-1.11.4# ls -lah config.h.in | |
-rw-r--r-- 1 30015 30000 3.4K Sep 6 2016 config.h.in |
NewerOlder