Skip to content

Instantly share code, notes, and snippets.

View jeremejazz's full-sized avatar

Jereme Causing jeremejazz

View GitHub Profile
@randyjensen
randyjensen / social_network_metadata
Created August 30, 2013 01:20
Meta Data For Social Networks
Facebook Open Graph
<head>
<meta property="og:title" content="Title Goes Here">
<meta property="og:description" content="description-goes-here">
<meta property="og:type" content="your-content-type-goes-here"> (e.g., "article")
<meta property="og:url" content="http://www.your-site.com/">
<meta property="og:image" content="http://www.your-site.com/image.jpg">
<meta property="og:site_name" content="your-site-name">
<meta property="fb:admins" content="your-Facebook-page-user-ID">
@jeremejazz
jeremejazz / ConvertHoursMins.php
Created June 3, 2013 05:31
used to convert Hours:Mins to minutes and the other way around
<?php
function convertMinsToHours($time, $format = '%d:%s') {
settype($time, 'integer');
if ($time < 0 || $time >= 1440) {
return;
}
$hours = floor($time/60);
$minutes = $time%60;
if ($minutes < 10) {
javascript: (function () {
function c() {
var e = document.createElement("link");
e.setAttribute("type", "text/css");
e.setAttribute("rel", "stylesheet");
e.setAttribute("href", f);
e.setAttribute("class", l);
document.body.appendChild(e)
}
function h() {
@ksafranski
ksafranski / SimpleStore.js
Last active July 2, 2022 15:25
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@sixman9
sixman9 / installKivySrc.sh
Last active June 25, 2019 08:38
Installs the latest Kivy source distribution from Github for Debian/Ubuntu
#!/bin/bash
kivyBaseBuildDir=/tmp
myKivyInstallAlias="kivyDev"
#Build and install Kivy on Ubuntu - http://kivy.org/docs/installation/installation.html#development-version
#Modify the PYTHONPATH to point at our Kivy install - see http://docs.python.org/2/tutorial/modules.html#the-module-search-path AND http://docs.python.org/2/tutorial/modules.html#standard-modules
sudo apt-get install python-setuptools python-pygame python-opengl python-gst0.10 python-enchant gstreamer0.10-plugins-good python-dev build-essential libgl1-mesa-dev libgles2-mesa-dev python-pip
if [ ! `pip freeze | grep -i cython` ]; then
@jessearmand
jessearmand / osm_maps_downloader.py
Created November 6, 2012 14:26
Download map tiles from MapQuest open street map source
#!/usr/local/bin/python
from sys import argv
import os
import math
import urllib2
def deg2num(lat_deg, lon_deg, zoom):
lat_rad = math.radians(lat_deg)
n = 2.0 ** zoom
@matthewhudson
matthewhudson / gist:1603502
Created January 12, 2012 22:21
Integrate Open Graph with Tumblr
<!-- Open Graph tags for your home page (index). -->
<meta property="og:site_name" content="{Title}" />
<meta property="fb:app_id" content="FACEBOOK_APPID"/>
<meta property="fb:admins" content="FACEBOOK_USERID" />
<meta property="og:description" content="{MetaDescription}" />
<meta property="og:locale" content="en_US" />
{block:IndexPage}
<meta property="og:image" content="{PortraitURL-128}" />
<meta property="og:title" content="{Title}" />