THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#! /bin/sh | |
# @author: Claus Witt | |
# http://clauswitt.com/319.html | |
# Adding or Removing Items to hosts file | |
# Use -h flag for help | |
DEFAULT_IP=127.0.0.1 | |
IP=${3:-$DEFAULT_IP} |
ghanity () | |
{ | |
local code="$1" url="$2"; | |
echo 'creating vanity GitHub URL... '; | |
ghurl=$(curl -s -i http://git.io -F "url=$url" -F "code=$code" | grep Location | awk '{print $2}'); | |
echo $ghurl | pbcopy; | |
echo "copied to clipboard: ${ghurl}" | |
} |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
""" | |
Based on: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ | |
Comments resceived: https://gist.github.com/petrklus/b1f427accdf7438606a6 | |
Original pseudo code: | |
Set Temperature = Temperature \ 100 | |
Calculate Red: | |
If Temperature <= 66 Then |
package proxy | |
import ( | |
"io" | |
"log" | |
"net" | |
) | |
func Proxy(srvConn, cliConn *net.TCPConn) { | |
// channels to wait on the close event for each connection |
/* | |
* Trying to feature-detect (very naive) | |
* CSS Flexbox support. | |
* - Only most modern syntax | |
* | |
* Is this nonsense? | |
*/ | |
(function NaiveFlexBoxSupport(d){ | |
var f = "flex", e = d.createElement('b'); |
#!/bin/sh | |
# | |
# Read-only Root-FS for Raspian | |
# | |
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with | |
# overlayfs integrated in Linux Kernel >= 3.18. | |
# | |
# Originally written by Axel Heider (Copyright 2012) for Ubuntu 11.10. | |
# This version can be found here: | |
# https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash#Overlayfs |
# Copyright Carve Systems 2015 | |
# | |
# LICENSE: If you use this code, and it helped you learn or accomplish a goal, | |
# please let us know. We would love to hear from you. | |
# Keep our numbers clean and such | |
def toint32(val): | |
return val & 0xffffffff | |
def toint16(val): |