Skip to content

Instantly share code, notes, and snippets.

View defaultstate's full-sized avatar

Mark Thompson defaultstate

  • DefaultState
  • Taguig, Metro Manila, Philippines
View GitHub Profile
@moshest
moshest / appspec.yml
Last active October 13, 2021 18:09
Node.js Project on AWS CodeDeploy CentOS
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/node
permissions:
- object: /home/ec2-user
owner: ec2-user
group: ec2-user
type:
@tdreyno
tdreyno / multiplexing_model.js
Created September 23, 2012 22:16
"Single Table Inheritance" for Ember.js
/**
* A root "Model" class for Objects which have inherited types based on
* a configurable per-object value.
*/
FS.MultiplexingModel = Em.Object.extend({
});
/**
* The great hash of klasses and types
@marcedwards
marcedwards / high-dpi-media.css
Last active September 24, 2025 23:32
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@stvvt
stvvt / bootstrap_form.php
Created October 12, 2011 07:44 — forked from slywalker/bootstrap_form.php
form helper for CakePHP on twitter bootstrap
<?php
class BootstrapFormHelper extends AppHelper {
public $helpers = array('Html', 'Form');
public function input($name, $options = array()) {
$default = array(
'type' => null,
'label' => null,
'before' => null, // to convert .input-prepend
@funkatron
funkatron / app.xml
Created May 19, 2011 14:24
This is a proof of concept to demonstrate listening for a callback request from Twitter's oAuth system with a local socket server in AIR
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/2.0">
<id>com.funkatron.jsOAuthListenerTest</id>
<filename>jsOAuthListenerTest</filename>
<name>jsOAuth AIR Listener Test</name>
<version>0.1</version>
<initialWindow>
<content>index_socket.html</content>
<visible>true</visible>
<width>700</width>
#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'