CIAccordionFoldTransition
CIAdditionCompositing
CIAffineClamp
CIAffineTile
CIAffineTransform
CIAreaAverage
CIAreaHistogram
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
# | |
# Print in one line dynamically | |
# | |
from sys import stdout | |
from time import sleep | |
def progress(): | |
for i in range(0,100): | |
stdout.write('\rLoading {}%'.format(i+1)) | |
stdout.flush() |
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
//: Playground - noun: a place where people can play | |
import Cocoa | |
import Darwin | |
func htons(value: CUnsignedShort) -> CUnsignedShort { | |
return (value << 8) + (value >> 8) | |
} | |
let INADDR_ANY = in_addr(s_addr: 0) |
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
package main | |
import ( | |
"net" | |
) | |
func main(){ | |
message := []byte("Hello world") | |
localAddress, _ := net.ResolveUDPAddr("udp", "127.0.0.1:0") | |
remoteAddress, _ := net.ResolveUDPAddr("udp", "127.0.0.1:1936") |
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
class Router { | |
constructor(){ | |
const path = (window.location.href.split("/#!")[1]) | |
?(window.location.href.split("/#!")[1]) | |
:(window.location.href.split(/src\/html/)[1]) | |
// callbacks | |
this.actions = [] | |
this.state = { | |
baseURL: window.location.protocol+"://"+window.location.host, | |
path: path, |
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 | |
cat /dev/urandom | envcd 'a-f0-9' | head -c 16 |
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 | |
sudo perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;die@h{sort%h}' |
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
# Block access from IP | |
server { | |
listen 80 default; | |
server_name _; | |
ssl off; | |
# No response | |
return 444; | |
} |
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
[Unit] | |
Description=API web app | |
[Service] | |
PIDFile=/tmp/app.pid-0000 | |
User= | |
Group= | |
WorkingDirectory= | |
ExecStart=PATH-TO-APP/bin/app/start.sh |
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
<html> | |
<img src="" hide> | |
</html> |