As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| function hm_add_term_meta_table() { | |
| global $wpdb; | |
| if ( ! current_theme_supports( 'term-meta' ) ) | |
| return false; | |
| hm_create_term_meta_table(); | |
| $wpdb->tables[] = 'termmeta'; | |
| $wpdb->termmeta = $wpdb->prefix . 'termmeta'; | |
| } | |
| add_action( 'init', 'hm_add_term_meta_table' ); | |
| /** |
| /* | |
| * loop_rtmp.c: A simple service to loop RTMP VOD streaming | |
| * | |
| * Usage: | |
| * loop_rtmp <playlist> <channel> | |
| * | |
| */ | |
| #include <unistd.h> | |
| #include <stdint.h> |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| import ( | |
| "fmt" | |
| "io" | |
| "net/http" | |
| "strings" | |
| "time" | |
| ) | |
| // https://httpd.apache.org/docs/2.2/logs.html#combined + execution time. | |
| const apacheFormatPattern = "%s - - [%s] \"%s %s %s\" %d %d \"%s\" \"%s\" %.4f\n" |
| type ApacheLogRecord struct { | |
| http.ResponseWriter | |
| ip string | |
| time time.Time | |
| method, uri, protocol string | |
| status int | |
| responseBytes int64 | |
| elapsedTime time.Duration | |
| } |
| # Kernel sysctl configuration file for Red Hat Linux | |
| # | |
| # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
| # sysctl.conf(5) for more details. | |
| # Controls source route verification | |
| net.ipv4.conf.default.rp_filter = 1 | |
| # Do not accept source routing | |
| net.ipv4.conf.default.accept_source_route = 0 |
| package main | |
| import( | |
| "log" | |
| "net/url" | |
| "net/http" | |
| "net/http/httputil" | |
| ) | |
| func main() { |
| func appController(appController: TVApplicationController, evaluateAppJavaScriptInContext jsContext: JSContext) { | |
| jsContext.evaluateScript("var console = {log: function() { var message = ''; for(var i = 0; i < arguments.length; i++) { message += arguments[i] + ' ' }; console.print(message) } };") | |
| let logFunction: @convention(block) (NSString!) -> Void = { (message:NSString!) in | |
| print("JS: \(message)") | |
| } | |
| jsContext.objectForKeyedSubscript("console").setObject(unsafeBitCast(logFunction, AnyObject.self), forKeyedSubscript:"print") | |
| } |