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 | |
define('CLIENT_ID', 'YOUR_CLIENT_ID'); | |
define('CLIENT_SECRET', 'YOUR_CLIENT_SECRET'); | |
define('REDIRECT_URL', 'YOUR_REDIRECT_URL'); // for testing, use the URL to this PHP file. | |
define('AUTHORIZE_URL', 'https://www.formstack.com/api/v2/oauth2/authorize'); | |
define('TOKEN_URL', 'https://www.formstack.com/api/v2/oauth2/token'); | |
if (!empty($_GET['code'])) { | |
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 | |
namespace Framework; | |
use \PDO; | |
use \Exception; | |
abstract class Model { | |
private static $_host; | |
private static $_username; | |
private static $_password; | |
private static $_database; |
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
mkdir foo | |
cd foo | |
hg init | |
touch foo.txt | |
hg add | |
hg commit -m "foo.txt" | |
cd .. | |
hg clone foo foo-bar | |
cd foo-bar |
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> | |
<html> | |
<head> | |
<script src="//www.formstack.com/api/js/1.0.0/embedkit.js"></script> | |
</head> | |
<body onload="init();"> | |
<div id="embed" style="width:800px;"></div> | |
<script> | |
function responseHandler(res) { | |
console.log(res); |
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
{id : 12 , data: [{column: 1, value : 'foo'}, {column : 2, value : 'bar'}]} | |
{id : 12 , data: { 1: {value : 'foo'}, 2 : {value : 'bar'}}} |
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
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
logger = logging.getLogger('peewee') | |
logger.setLevel(logging.DEBUG) |
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/python | |
def parse_address_str(address): | |
parts = { | |
'address': '', | |
'address2': '', | |
'city': '', | |
'state': '', | |
'zip': '' |
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
syntax enable | |
set number | |
set ruler | |
set autoindent | |
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set background=dark | |
set nohlsearch |
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
settings = { | |
'settings': { | |
'analysis': { | |
'analyzer': { | |
'html': { | |
'type': 'custom', | |
'tokenizer': 'standard', | |
'filter': ['standard', 'lowercase', 'stop'], | |
'char_filter': ['html_strip'] | |
} |
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
import boto3 | |
autoscaling = boto3.client('autoscaling') | |
codedeploy = boto3.client('codedeploy') | |
hookMap = {} | |
print 'Gathering valid lifecycle hooks from CodeDeploy deployment groups...' | |
for applicationName in codedeploy.list_applications()['applications']: | |
for deploymentGroupName in codedeploy.list_deployment_groups(applicationName=applicationName)['deploymentGroups']: |
OlderNewer