- Author: Philippe Proulx
- Date: Fri Sep 13 18:05:26 EDT 2013
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
#!/bin/bash | |
# erase-install | |
# | |
# | |
# WARNING. This is a self-destruct script. Do not try it out on your own device! | |
# | |
# | |
# Specifically, this script does the following: | |
# 1. Checks whether a valid existing macOS installer (>= 10.13.4) is already present in the `/Applications` folder |
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
{"sig":"cc73a20676dfab1553c458e243be09fec1ff2ee51faab8a011dfe6a700cfa32f03269162d43e74edda264cb873918a772e8e2e153a83c0070daf8e3fa5f62d4d0","msghash":"4da8777b6b1a63aad1057f2b1a81a9bc59b5f218d3bcaf5cc0d78b07cc32f66b"} |
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
location /api { | |
proxy_pass http://localhost:12306.cn | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD'; | |
add_header 'Access-Control-Allow-Headers' 'Authorization, X-Requested-With, Content-Type'; | |
return 204; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
fabfile for Django | |
------------------ | |
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/ | |
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle) | |
several additions, corrections and customizations, too |
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
find . -type f -exec sed -i -e '1s/^\xEF\xBB\xBF//' {} \; |
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
<!DOCTYPE html> | |
<!-- | |
This is a simple experiment relying on ECMAScript 6 Proxies. To try this out, | |
use Aurora (http://www.mozilla.org/en-US/firefox/channel/). | |
The goal was to create a HTML writer where the method names were really just | |
the HTML tags names, but without manually creating each method. This uses | |
a Proxy to create a shell to an underlying writer object that checks each | |
method name to see if it's in a list of known tags. |
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
Copyright (c) 2008-2012 Nicholas O'Leary | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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
http://blog.new-bamboo.co.uk/2010/1/26/why-your-javascript-apps-need-more-structure | |
http://blog.new-bamboo.co.uk/2010/2/4/let-them-eat-state | |
http://blog.new-bamboo.co.uk/2010/3/7/the-js-model-layer | |
http://blog.new-bamboo.co.uk/2010/2/8/rendering-views-in-javascript | |
Controllers: | |
http://code.quirkey.com/sammy/ - Sammy is a tiny javascript framework built on top of jQuery. It’s RESTful Evented JavaScript. |
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
//To run Q.js examples: | |
// 1. Open a new browser tab in Chrome and turn on developer toolbar. | |
// 2. Copy/Paste this gist in the console and hit enter to run all the snippets. | |
// Based on the inspiration from samples @ https://github.com/kriskowal/q | |
//////////////////////////////////////////////////////////////////// | |
//////////////////////////////////////////////////////////////////// |
NewerOlder