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 sh | |
# Download this script and run: | |
# ./luanova.sh $destin_folder | |
# ($destin_folder is optional) | |
# THIS SCRIPT BUILD AND INSTALL A STANDALONE LUA AND LUAROCKS PACKAGE | |
# IF YOU CHANGE THE PATH, PLEASE RUN THIS SCRIPT AGAIN (BECAUSE LUAROCKS ABSOLUTE PATHS) | |
# FUNCTIONS |
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/lua | |
local http = require('socket.http') | |
local cjson = require('cjson') | |
local response = http.request('http://www.w3schools.com/website/customers_mysql.php') | |
local customers = cjson.decode(response) | |
for i,customer in pairs(customers) do | |
print(customer.Name ..', '.. customer.City ..' - '.. customer.Country) |
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
/* See LICENSE file for copyright and license details. */ | |
/* appearance */ | |
static const unsigned int borderpx = 1; /* border pixel of windows */ | |
static const unsigned int snap = 32; /* snap pixel */ | |
static const int showbar = 1; /* 0 means no bar */ | |
static const int topbar = 1; /* 0 means bottom bar */ | |
static const char *fonts[] = { "monospace:size=10" }; | |
static const char dmenufont[] = "monospace:size=10"; | |
static const char col_gray1[] = "#000000"; |
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
"amixer -q sset Master 3%+" | |
m:0x0 + c:123 | |
XF86AudioRaiseVolume | |
"amixer -q sset Master 3%-" | |
m:0x0 + c:122 | |
XF86AudioLowerVolume | |
"amixer -q sset Master toggle" | |
m:0x0 + c:121 |
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
XTerm*selectToClipboard: true | |
XTerm*faceName: DejaVu Sans Mono:pixelsize=13 | |
XTerm*background: #111111 | |
XTerm*foreground: #eeeeee | |
XTerm*color0: #000000 | |
XTerm*color1: #9e1828 | |
XTerm*color2: #aece92 | |
XTerm*color3: #968a38 | |
XTerm*color4: #414171 | |
XTerm*color5: #963c59 |
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 sh | |
xsetroot -solid black | |
while true | |
do | |
dropbox="Dropbox: $(dropbox status | head -1) |" | |
ip="$(ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | cut -d' ' -f1) |" | |
volume="Volume: $(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/') |" | |
battery="Battery: $(acpi -b | awk '{ print $4 $5 }' | sed 's/,/ \/ /g') |" | |
datetime=$(date) |
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
# ~/.ssh/config | |
Host foobar-proxy.example.com | |
HostName foobar.example.com | |
ProxyCommand nc -X connect -x proxyhost:proxyport %h %p | |
ServerAliveInterval 10 |
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
for file in *.JPG; do convert $file -resize 1024x768 resized-$file; 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
curl -s -w "%{time_total}\n" -o /dev/null www.example.com |
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
export DROPBOX_USE_LIBAPPINDICATOR=1 |