Skip to content

Instantly share code, notes, and snippets.

@CodySwannGT
CodySwannGT / cloudflare.conf
Created April 26, 2012 01:22
WordPress/Nginx/PHP/Varnish Configuration
# /etc/nginx/cloudflare.conf
# If using Cloudflare, uncomment the following to get proper originating IPs
#set_real_ip_from 204.93.240.0/24;
#set_real_ip_from 204.93.177.0/24;
#set_real_ip_from 199.27.128.0/21;
#set_real_ip_from 173.245.48.0/20;
#set_real_ip_from 103.22.200.0/22;
#set_real_ip_from 141.101.64.0/18;
#real_ip_header CF-Connecting-IP;
<div class="team-member"><a title="Jacob Arback" href="/2012/11/16/jacob-arback/">
<img class="wp-image-528" alt="Jacob Arback" src="http://dhwlijwe9jil7.cloudfront.net/files/2012/11/44/Jacob1-200x300.jpg" width="120" height="180" />
</a>
<h3><a title="Jacob Arback" href="/2012/11/16/jacob-arback/">Jacob Arback</a></h3>
<h6>President and CEO</h6>
</div>
<div class="team-member"><a title="Mohamed Mohsen" href="/2012/11/16/mohamed-mohsen-co-founder">
<img class="wp-image-528" alt="Mohamed Mohsen" src="http://dhwlijwe9jil7.cloudfront.net/files/2012/11/44/Mo2-200x300.jpg" width="120" height="180" />
</a>
<h3><a title="Mohamed Mohsen" href="/2012/11/16/mohamed-mohsen-co-founder/">Mohamed Mohsen</a></h3>
@CodySwannGT
CodySwannGT / User
Last active August 29, 2015 14:07
Facebook Flow
class User
def facebook
fa_token = facebook_access_token
if facebook_expires_at && facebook_expires_at < Time.now
# IF WE THINK THE TOKEN HAS EXPIRED, TRY TO UPDATE IT
oauth = Koala::Facebook::OAuth.new(ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'])
new_access_info = oauth.exchange_access_token_info(facebook_access_token)
new_access_token = new_access_info["access_token"]
new_access_expires_at = DateTime.now + new_access_info["expires"].to_i.seconds
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.3
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
$(function(){
if(location.hash == "#open_modal") {
$("whatever-the-link-element-is").trigger('click')
}
})
//url would look something like: http://qualismanagement.com/orders/#open_modal
override func viewDidLayoutSubviews() {
// 10% for X button
// 15% for avatar bar
// 25% for war pic
// remainder for tables
if (layoutsCalled >= 2) {
return
}
layoutsCalled++
{
parts: [
{
title: "Folder",
documents: [
{
title: "Doctor Information",
documentType: "questionaire",
completed: false,
sections: [
{
email: "[email protected]",
encryptedPassword: "",
notebook: {
parts: [
{
title: "Folder",
documents: [
{
title: "Doctor Information",
{
parts: [
{
title: "Folder",
documents: [
{
id: "some-generated-id",
title: "Doctor Information",
documentType: "questionaire",
/*******************************************************
# * By Gunner Technology [email protected]
# *
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version as long as your provide attribution.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of