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/bash | |
case $1 in | |
install|reinstall) | |
options=S | |
;; | |
remove) | |
options=Rc | |
;; | |
search) |
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
(ns me.zzp.http | |
(:require [clojure.string :refer [blank?]]) | |
(:import java.io.PrintStream | |
java.net.ServerSocket | |
java.util.Scanner | |
java.util.concurrent.atomic.AtomicLong) | |
(:gen-class)) | |
(defonce generitor (AtomicLong.)) |
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
/* | |
* Ctrl(C): ^ | |
* Option(M): ~ | |
*/ | |
{ | |
"^/" = "undo:"; | |
"^a" = "moveToBeginningOfLine:"; | |
"^e" = "moveToEndOfLine:"; | |
"^g" = "_cancelKey:"; | |
"^t" = "transpose:"; |
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
[user] | |
email = [email protected] | |
name = redraiment | |
[push] | |
default = simple | |
[credential] | |
helper = store |
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
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_toggle.bounds | |
byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerBottomLeft) | |
cornerRadii:CGSizeMake(8.0, 8.0)]; | |
CAShapeLayer *maskLayer = [CAShapeLayer new]; | |
maskLayer.frame = _toggle.bounds; | |
maskLayer.path = maskPath.CGPath; | |
_toggle.layer.mask = maskLayer; |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <setjmp.h> | |
jmp_buf __exception_context; | |
#define try if(!setjmp(__exception_context)) | |
#define catch else | |
#define throw_exception longjmp(__exception_context, 1) | |
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
(defun current-sentence () | |
(interactive) | |
(replace-regexp-in-string "\n" ";" | |
(substring-no-properties | |
(or (sentence-at-point) | |
(save-excursion | |
(backward-sentence) | |
(sentence-at-point)))))) | |
(defun commit-last-js () |
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
var File = function(name) { | |
this.file = new java.io.File(name); | |
}; | |
File.prototype.map = function(fn) { | |
var fin = new java.util.Scanner(this.file); | |
var content = []; | |
while (fin.hasNextLine()) { | |
content.push(fn(fin.nextLine())); | |
} |
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/ruby | |
require "fileutils" | |
require "erubis" | |
require "yaml" | |
def erm(source) | |
content, data = "", {} | |
loop do | |
properties, fragment = File.read(source).split("---\n", 2) |
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
# minimize reset tag level, so that user can override them | |
styles = {} | |
Object.class_eval do | |
define_method :style do |tag, properties| | |
styles[tag] ||= {} | |
styles[tag].merge!(properties) | |
end | |
end |