This file contains 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 | |
# Prints whispery word with alternating vowels and [5, 8] length. | |
consonants="ptkfs" | |
vowels="aeo" | |
parts=$((5+RANDOM%4)) | |
parity=$((RANDOM%2)) |
This file contains 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
scrobble_file = '/home/amar/.local/share/mpv/scrobble.txt' -- Make sure this dir exists | |
paused = false | |
playing = '' | |
function update_file() | |
local file = assert(io.open(scrobble_file, 'w')) | |
file:write(paused and ' ' or ' ', playing) | |
file:close() | |
end |
This file contains 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/sh | |
mkdir -p ./di.fm | |
cd ./di.fm | |
curl --silent "http://listen.di.fm/public3" | python -mjson.tool | grep playlist | sed -e 's/^[[:space:]]*//' | cut -d " " -f2 | tr -d '"' \ | |
| while read url | |
do | |
echo "Downloading: $url" |
This file contains 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/lsc | |
/** | |
* @author Amar | |
* @description A LiveScript i3status replacement | |
* @requires ttf-font-icons (AUR) | |
* @version 1.0.0 | |
*/ | |
require! [fs, child_process, moment] |
This file contains 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(){ | |
var scr = document.createElement('script'); | |
scr.src = chrome.extension.getURL('suppress.js'); | |
scr.async = false; | |
document.documentElement.appendChild(scr); | |
})(); |
This file contains 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
// Suppress Manyland init during page load | |
(function(){ | |
var MLand; | |
Object.defineProperty(window, 'MLand', { | |
get: function () { | |
return MLand; | |
}, | |
set: function (it) { | |
Object.defineProperty(it, 'start', { | |
get: function () { |
This file contains 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 python2 | |
import os, subprocess, sys, urlparse | |
def detach_open(cmd, cwd=None): | |
# Thanks to the vast knowledge of Laurence Withers (lwithers) and this message: | |
# http://mail.python.org/pipermail/python-list/2006-November/587523.html | |
if not os.fork(): | |
null = os.open(os.devnull,os.O_WRONLY) | |
for i in range(3): os.dup2(null,i) |
This file contains 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 lsc | |
const CHARS = 5 | |
ords = [0 for til CHARS] | |
ord-to-char = -> String.from-char-code 97 + it | |
while true | |
ords |> (.map ord-to-char) |> (.join '') |> (+ \.com) |> console.log |
This file contains 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/bash | |
# domain-filter.sh | |
# Reads URLs from stdin, writes the valid ones to stdout | |
# Based off of http://linuxconfig.org/check-domain-name-availability-with-bash-and-whois | |
# @author Yousef Amar <yousef@amar.io> | |
while read line | |
do | |
whois "$line" | grep -Eq '^No match|^NOT FOUND|^Not fo|AVAILABLE|^No Data Fou|has not been regi|No entri' |
This file contains 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 lsc | |
w = 0.5 | |
_w = 1 - w | |
n1 = 50 | |
n2 = 100 | |
mem = 200 | |
i = 0 | |
do |