Normal Text
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
-- duplicateFinderTab.scpt | |
-- Uses a hacky workaroud to duplicate the frontmost Finder tab, | |
-- since Apple hasn't provided great AppleScript support for this. | |
-- Details at: | |
on new_tab() | |
tell application "System Events" to tell application process "Finder" | |
set frontmost to true | |
tell front menu bar to tell menu "File" to tell menu item "New Tab" | |
perform action "AXPress" |
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
upstream backend { | |
server localhost:8080; | |
#server backup1.example.com:8080 backup; | |
#server backup2.example.com:8080 backup; | |
} | |
# Set cache dir | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:10m; | |
# Set cache key to include identifying components |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type test_struct struct { | |
Test string |
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
import UIKit | |
import Foundation | |
import XCPlayground | |
XCPSetExecutionShouldContinueIndefinitely() | |
class RemoteAPI { | |
func getData(completionHandler: ((NSArray!, NSError!) -> Void)!) -> Void { | |
let url: NSURL = NSURL(string: "http://itunes.apple.com/search?term=Turistforeningen&media=software") | |
let ses = NSURLSession.sharedSession() |
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
/* | |
This exmple program provides a trivial server program that listens for TCP | |
connections on port 9995. When they arrive, it writes a short message to | |
each client connection, and closes each connection once it is flushed. | |
Where possible, it exits cleanly in response to a SIGINT (ctrl-c). | |
*/ | |
/* Deklarasi lib standar yang digunakan */ | |
#include <string.h> |
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
package main | |
import ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"reflect" | |
"time" | |
"github.com/gorilla/context" |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+super+l"], "command": "sublimelinter_lint" }, | |
{ "keys": ["ctrl+super+e"], "command": "sublimelinter_goto_error", "args": {"direction": "next"} }, | |
{ "keys": ["ctrl+super+shift+e"], "command": "sublimelinter_goto_error", "args": {"direction": "previous"} }, | |
{ "keys": ["ctrl+super+b"], "command": "sublimelinter_show_all_errors" }, | |
{ "keys": ["super+ctrl+a"], "command": "alignment" }, | |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } | |
] |
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
# | |
# Makefile to perform "live code reloading" after changes to .go files. | |
# | |
# n.b. you must install fswatch (OS X: `brew install fswatch`) | |
# | |
# To start live reloading run the following command: | |
# $ make serve | |
# | |
# binary name to kill/restart |