Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
def setup_alarm_notification(for_day, with_switch) | |
alarm_date = App::Persistence[for_day] | |
alarm_is_set = App::Persistence[with_switch]; | |
if (alarm_is_set && alarm_date && (alarm_date > Time.now)) | |
local_notification = UILocalNotification.alloc.init | |
local_notification.fireDate = NSDate.dateWithString( alarm_date.to_s ) | |
local_notification.alertBody = "Time to get up! #{alarm_date.strftime('%H:%M')}" | |
local_notification.soundName = UILocalNotificationDefaultSoundName | |
local_notification.applicationIconBadgeNumber = 1 |
var dedupe_view = function() { | |
var z = jQuery( '.titleCell' ), zlen = z.length, curr, last; | |
for ( var y = 0; y < 2; y += 1 ) { | |
for ( var x = 0; x < zlen; x += 1 ) { | |
zitem = z[ x ]; | |
curr = jQuery( zitem ).attr( 'title' ); | |
if ( curr === "" || curr === null || 'undefined' === typeof curr ) continue; | |
if ( last === curr ) { | |
jQuery( zitem ).parent().find( '[actiontypes="remove"]' ).click().parent().click().parent().click(); | |
} else { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Chronological Diagram of Asia</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style type="text/css"> | |
.chart { | |
shape-rendering: crispEdges; | |
} |
<?php | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
#!/usr/bin/env node | |
/** | |
* INSTRUCTIONS | |
* | |
* npm install http-proxy | |
* node proxy.js | |
*/ | |
var config = { |
#!/bin/sh | |
## | |
# This is a script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# Run in interactive mode with: | |
# $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)" | |
# | |
# or run it without prompt questions: |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
from urllib import quote_plus | |
from lxml import etree | |
def untruncate(s): | |
q = s.strip(u' .\u2026') | |
url = 'http://google.com/complete/search?output=toolbar&q=' + quote_plus(q.encode('latin-1')) | |
root = etree.parse(url).getroot() | |
return q + root[0][0].attrib['data'][len(q):] if len(root) else s | |
def demo(): |
#!/usr/bin/env ruby | |
# This pre-commit hook will prevent any commit to forbidden branches | |
# (by default, "staging" and "production"). | |
# Put this file in your local repo, in the .git/hooks folder | |
# and make sure it is executable. | |
# The name of the file *must* be "pre-commit" for Git to pick it up. | |
FORBIDDEN_BRANCHES = ["staging", "production"] |