Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env lsc
w = 0.5
_w = 1 - w
n1 = 50
n2 = 100
mem = 0
i = 0
do
#!/usr/bin/env lsc
w = 0.5
_w = 1 - w
n1 = 50
n2 = 100
mem = 200
i = 0
do
#!/usr/bin/env lsc
w = 0.5
_w = 1 - w
n1 = 50
n2 = 100
mem = 200
i = 0
do
#!/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'
#!/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
#!/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)
// 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 () {
(function(){
var scr = document.createElement('script');
scr.src = chrome.extension.getURL('suppress.js');
scr.async = false;
document.documentElement.appendChild(scr);
})();
#!/usr/bin/lsc
/**
* @author Amar
* @description A LiveScript i3status replacement
* @requires ttf-font-icons (AUR)
* @version 1.0.0
*/
require! [fs, child_process, moment]
#!/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"