###Edit this file
/etc/nginx/nginx.conf
###Add this line anywhere inside the http { }
block:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
###Go to your Forge panel and restart Nginx
###Edit this file
/etc/nginx/nginx.conf
###Add this line anywhere inside the http { }
block:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
###Go to your Forge panel and restart Nginx
INCR next_user_id //returns 1000 | |
HMSET user:1000 name bart password ¤¤¤hash¤¤¤ | |
HSET users bart 1000 | |
ZADD followers:1000 1401267618 1234 | |
ZADD following:1234 1401267618 1000 | |
INCR next_post_id => 10343 | |
HMSET post:10343 user 1000 time $time body ’Ay Caramba’ | |
RPUSH posts:1000 10343 |
module Abstract | |
def abstract_methods(*args) | |
args.each do |name| | |
class_eval(<<-END, __FILE__, __LINE__) | |
def #{name}(*args) | |
raise NotImplementedError.new("You must implement #{name}.") | |
end | |
END | |
end | |
end |
/* | |
--- | |
name: guilloche | |
script: guilloche.js | |
description: guilloche | |
provides: [Guilloche] | |
... | |
*/ |
(function($){ | |
var insertAtCaret = function(value) { | |
if (document.selection) { // IE | |
this.focus(); | |
sel = document.selection.createRange(); | |
sel.text = value; | |
this.focus(); | |
} | |
else if (this.selectionStart || this.selectionStart == '0') { | |
var startPos = this.selectionStart; |
class Rack::SecureHeaders | |
def initialize(app, options = {}) | |
@app, @options = app, options | |
end | |
def call(env) | |
response = @app.call(env) | |
# [status, headers, response] = response | |
$ = jQuery | |
TIMEOUT = 20000 | |
lastTime = (new Date()).getTime() | |
setInterval -> | |
currentTime = (new Date()).getTime() | |
# If timeout was paused (ignoring small | |
# variations) then trigger the 'wake' event | |
if currentTime > (lastTime + TIMEOUT + 2000) |
CREATE FUNCTION prefixes(varchar, integer) RETURNS varchar AS $$ | |
DECLARE | |
result varchar; | |
minlength integer; | |
BEGIN | |
SELECT GREATEST($2, 0) INTO length; | |
WITH RECURSIVE t(value, n) AS ( | |
SELECT $1, length($1) | |
UNION ALL | |
SELECT substring(value for n-1), n-1 FROM t WHERE n>minlength |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.