Skip to content

Instantly share code, notes, and snippets.

View jaspervalero's full-sized avatar

Jasper Valero jaspervalero

View GitHub Profile
@jaspervalero
jaspervalero / GitSwitch
Created February 22, 2012 05:42
PHP | GitSwitch is a PHP script that allows issues from a GitHub repository to be imported directly into PivotalTracker using a custom import panel.
<?php
/**
* GitSwitch.php
*
* This is a script for integrating GitHub issues with PivotalTracker. It allows a panel to be created in PivotalTracker
* that will allow issues/bugs to be imported from GitHub. Please note GitSwitch does not allow you to directly update
* or modify issues in GitHub from PivotalTracker. It is currently export only GitHub --> PivotalTracker. If you would
* like to see update/modify functionality in a future release please contact me at [email protected] and let me know.
*
* GitSwitch uses the GitHub API v2.
@jaspervalero
jaspervalero / Zipcode to WOEID Converter in AS3 (Yahoo API)
Created February 26, 2012 09:11
AS3 | This is a zipcode to Where On Earth ID (WOEID) converter class which allows you to query weather and map results by zipcode. Soon the Yahoo API will no longer support direct requests by zipcode, and will only accept requests by WOEID. This class will ensu
package com.jaspervalero.tools
{
/*######################################
# Yahoo Zipcode to WOEID Converter #
# Written By: Jasper Valero #
# www.jaspervalero.com #
# July 13th, 2011 #
######################################*/
import flash.events.Event;
@jaspervalero
jaspervalero / Log JSON
Created June 13, 2013 03:48
JS | Log object in JSON format to the console
console.log( 'JSON:', JSON.stringify( jsonObject, null, 4 ) );
@jaspervalero
jaspervalero / Quick API Proxy
Last active December 18, 2015 11:49
PHP | Quick API Proxy
<?php
// Get query string
$queryString = $_SERVER['QUERY_STRING'];
// Get requested search term
$requestURL = 'https://apib4.blinkx.com/api.php?' . $queryString;
// Get XML from API
$json = callAPI( $requestURL );
header( 'Access-Control-Allow-Origin: *' );
@jaspervalero
jaspervalero / Gruntfile.js
Created October 13, 2014 02:31
Gruntfile.js w/ Mocha, Phantom.js, LiveReload (Code Example)
module.exports = function( grunt ) {
var port = 8981;
// Task config
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
clean: {
files: [ 'dist' ]
},
$ echo "function gi() { curl -L -s https://www.gitignore.io/api/\$@ ;}" >> ~/.zshrc && source ~/.zshrc
$ echo "function gi() { curl -L -s https://www.gitignore.io/api/\$@ ;}" >> ~/.bash_profile && source ~/.bash_profile
@jaspervalero
jaspervalero / gist:ca8ee62fdb10a50e4ec2
Created February 20, 2015 05:34
My custom dotfile function for gitignore.io
# Generate .gitignore file from gitignore.io API
# $@ - Comma separated list of templates to use, i.e. osx,sublimetext
# Common commands:
# 'ignore list' - List all currently supported templates
# 'ignore example1,example2' - Preview output in console
# 'ignore example1,example2 >> .gitignore' - Output to .gitignore file in CWD
# 'ignore example1,example2 >> ~/.gitignore' - Output to global .gitignore
function ignore() {
curl -s https://www.gitignore.io/api/$@ ;
}
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon