Skip to content

Instantly share code, notes, and snippets.

View reggi's full-sized avatar
🌺
Learning

Thomas Reggi reggi

🌺
Learning
View GitHub Profile
@carolineschnapp
carolineschnapp / collection-listing-using-linklist.liquid
Created August 13, 2010 19:48
Listing all collections in the shop
@azampagl
azampagl / statetmzs.py
Created November 11, 2011 14:52
State to timezone conversion.
#
# Matches a state to its timezone (if it has only one).
#
# Commented out fields mean that the state
# has multiple timezones or was unknown at the time.
#
# @author Aaron Zampaglione <azampagl@azampagl.com>
# @copyright 2011 Aaron Zampaglione
# @license MIT
#
@ahgittin
ahgittin / jsonball.rb
Created February 23, 2012 21:57
a jekyll tag to parse json files and objects for use as maps subsequently
require 'json'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
#
# where TYPE is one of {data,var,file,page}, described below
@nicferrier
nicferrier / gist:2277987
Created April 1, 2012 19:34
Clone a git repo if it does not exist, or pull into it if it does exist
#!/bin/sh
REPOSRC=$1
LOCALREPO=$2
# We do it this way so that we can abstract if from just git later on
LOCALREPO_VC_DIR=$LOCALREPO/.git
if [ ! -d $LOCALREPO_VC_DIR ]
then
@kevinold
kevinold / simple-twitter-timeline.html
Created June 29, 2012 15:25 — forked from bchhun/simple-twitter-timeline.html
Simple Twitter Timeline with AngularJS
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>Twitter widget</title>
@rodw
rodw / backup-github.sh
Last active March 30, 2024 15:04
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
/*
* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery
*
* Copyright (c) 2009 jQuery HowTo
*
* Licensed under the GPL license:
* http://www.gnu.org/licenses/gpl.html
*
* URL:
* http://jquery-howto.blogspot.com
@christophercliff
christophercliff / Makefile
Created December 14, 2012 00:19
Makefile for deploying a Wintersmith static site to Github Pages without exposing the source (assumes you're using the default build directory).
deploy:
rm -rf ./build
wintersmith build
cd ./build && \
git init . && \
git add . && \
git commit -m "Deploy"; \
git push "git@github.com:{YOUR NAME}/{YOUR REPO}.git" master:gh-pages --force && \
rm -rf .git
@JamieMason
JamieMason / is_installed.sh
Last active February 17, 2024 10:12
Check if a program exists from a bash script.Thanks to twitter.com/joshnesbitt and twitter.com/mheap for the help with detecting npm packages.
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
@ziadoz
ziadoz / stripe-checkout.html
Last active November 19, 2022 05:59
Custom Stripe Checkout Button
<form action="." method="post">
<noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript>
<input
type="submit"
value="Pay with Card"
data-key="PUBLISHABLE STRIPE KEY"
data-amount="500"
data-currency="cad"
data-name="Example Company Inc"