- http://serverfault.com/questions/416787/nginx-403-forbidden-error-hosting-in-user-home-directory
- rails deploy with rvm, capistrano, uniron, nginx
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
document.getElementsByTagName('button')[0].onclick = function () { | |
scrollTo(document.body, 0, 1250); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |
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
<?php | |
/** | |
* WP Redix Index | |
* | |
* Redis caching system for WordPress. Inspired by Jim Westergren. | |
* | |
* @author Jeedo Aquino | |
* @see http://www.jeedo.net/lightning-fast-wordpress-with-nginx-redis/ | |
* @see http://www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/ | |
*/ |
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
- certain endpoints are always blocked | |
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
ngx.exit(403) | |
end | |
-- import requirements | |
local cjson = require "cjson" | |
-- setup some app-level vars | |
local app_id = "APP_ID" |
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
;; ummels's solution to Palindromic Numbers | |
;; https://4clojure.com/problem/150 | |
(fn [n] | |
(letfn [(decode [n] (if (< n 10) [n] (conj (decode (quot n 10)) (rem n 10)))) | |
(encode [x] (reduce #(+ (* % 10) %2) 0 x)) | |
(next-pal [n] | |
(let [N (decode n) | |
l (count N) | |
d (quot l 2) |
NewerOlder