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/sh | |
yum -y install wget unzip | |
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm | |
yum -y install python-psycopg2 python-lxml PyXML python-setuptools libxslt-python pytz \ | |
python-matplotlib python-babel python-mako python-dateutil python-psycopg2 \ | |
pychart pydot python-reportlab python-devel python-imaging python-vobject \ | |
hippo-canvas-python mx python-gdata python-ldap python-openid \ | |
python-werkzeug python-vatnumber pygtk2 glade3 pydot python-dateutil \ | |
python-matplotlib pygtk2 glade3 pydot python-dateutil python-matplotlib \ |
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
$node_type = 'lease'; | |
//fetch the nodes we want to delete | |
$result = db_query("SELECT nid FROM {node} WHERE type='%s'",$node_type); | |
while ($row = db_fetch_object($result)){ | |
node_delete($row->nid); | |
$deleted_count+=1; | |
} | |
//simple debug message so we can see what had been deleted. | |
drupal_set_message("$deleted_count nodes have been deleted"); |
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
mmm d, yyyy hh:mm:ss AM/PM |
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 ruby | |
require 'time' | |
require 'logger' | |
require 'rubygems' | |
require 'pingdom-client' | |
require 'active_support/core_ext/numeric/time' # time extensions, e.g., 5.days | |
require 'stashboard' | |
TIME_FORMAT = "%Y-%m-%d %H:%M:%S %Z" # YYYY-MM-DD HH:MM:SS ZZZ |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
validates :phone_number, format: { with: /\d{3}-\d{3}-\d{4}/, message: "bad format" } |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 |
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
osrm: | |
command: './start.sh Colorado http://download.geofabrik.de/north-america/us/colorado-latest.osm.pbf' | |
image: 'irony/osrm5:latest' | |
ports: | |
- '5000:5000' | |
volumes_from: | |
- osrm-data | |
osrm-data: | |
image: 'irony/osrm5:latest' | |
volumes: |
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/php | |
<?php | |
//debug | |
#ini_set ("display_errors", "1"); | |
#error_reporting(E_ALL); | |
//include email parser | |
require_once('/var/www/rfc822_addresses.php'); | |
require_once('/var/www/mime_parser.php'); |
OlderNewer