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 strict'; | |
(function($) { | |
//toggle this between true and false to allow/disallow testing the app in the browser | |
window.localApp = true; | |
window.app = (function() { | |
//this object will store methods and variables that will be accessible outside of the window.app module | |
var pub = {}; |
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
//convert the status id returned from openweathermap.org | |
function convertWeatherID(id) { | |
var returnWeather = ''; | |
//check the ID | |
switch(id) { | |
//STORM | |
case 200: | |
case 201: | |
case 210: |
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
/*----------------------------------------------------------------------------------- | |
Shuffle Example - build and shuffle a deck of cards | |
This was built during a presentation for Girl Develop It! Charlotte's | |
Beginner JavaScript class on Loops, Arrays, Objects, and Functions. | |
It started as a hopefully simple example of how one could use arrays to do | |
something programmatically and then got a little out of hand. |
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
# Load the .bashrc configuration whenever .bash_profile (this file) is sourced | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |
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
//check for mobile devices | |
//modified from http://bit.ly/nMEXh4 | |
var ua = navigator.userAgent; | |
var checker = { | |
iphone: ua.match(/(iPhone|iPod)/), | |
ipad: ua.match(/(iPad)/), | |
blackberry: ua.match(/BlackBerry/), | |
android: ua.match(/Android/) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>Crafted with love and passion by Bernat Fortet, special treatment for Front End coding: HTML, CSS, LESS, JADE, JS... more coming soon </string> | |
<key>author</key> | |
<string>Bernat Fortet</string> | |
<key>name</key> | |
<string>Bernat's FrontEnd Deligh</string> |
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
<?php //get tweets | |
function get_tweets($s) { | |
$url = 'http://search.twitter.com/search.json?q=' . urlencode($s); | |
//set up var for holding tweets | |
$local_tweets = ''; | |
//check for cache from 5 minutes ago | |
if(get_transient('bodyadorned_tweets_short')) { | |
$local_tweets = get_transient('bodyadorned_tweets_short'); | |
//if it isn't found, try to update tweets | |
} else { |
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
<?php | |
/*-------------------------------------------------------------------------- | |
This pulls in tweets gathered from the WordPress plugin | |
ouath-twitter-feed-for-developers and converts them into | |
an <article> tag | |
It takes retweets into account and then updates links within | |
the tweet text to convert urls, tags, and hashes into anchor |
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
<?php | |
/*-------------------------------------------------------------------------- | |
Better AJAX for WordPress | |
inspired by: | |
http:wordpress.stackexchange.com/questions/28342/is-there-a-way-to-use-the-wordpress-users-but-without-loading-the-entire-wordpre#answer-45011 | |
--------------------------------------------------------------------------*/ |
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
-- generates xip.io url with optional port | |
-- I store this script in my ~/bin directory and then use `ln -s ~/bin/xip.io.scpt` to create a symbolic link in the folder for my current project | |
-- Here's the funciton in my ~/.bashrc file: | |
-- function xipit() { | |
-- port=$@ | |
-- if [ ! -f xip.io.scpt ]; then | |
-- ln -s ~/bin/xip.io.scpt; | |
-- fi | |
-- osascript xip.io.scpt $port; |
OlderNewer