Skip to content

Instantly share code, notes, and snippets.

View junrillg's full-sized avatar
💻
Got something to work?

Junrill Galvez junrillg

💻
Got something to work?
View GitHub Profile
@junrillg
junrillg / gist:f1d6b2c05bf473c966947f2cc27815dc
Created May 22, 2016 12:21 — forked from romainneutron/gist:5340930
Download large files using Guzzle
<?php
use Guzzle\Http\Client;
require __DIR__ . '/vendor/autoload.php';
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$handle = fopen($tmpFile, 'w');
$client = new Client('', array(
Client::CURL_OPTIONS => array(
#import "NSData+OADataHelpers.h"
@implementation NSData (OADataHelpers)
- (NSString*) UTF8String
{
return [[[NSString alloc] initWithData:[self dataByHealingUTF8Stream] encoding:NSUTF8StringEncoding] autorelease];
}
// Replaces all broken sequences by � character and returns NSData with valid UTF-8 bytes.
@junrillg
junrillg / UIColor+HexString.h
Created April 4, 2016 00:00 — forked from codingrhythm/UIColor+HexString.h
Objective-C class to convert hex string to UIColor. Support #RGB # ARGB #RRGGBB #AARRGGBB Usage: [UIColor colorWithHexString:@"#f5e6a1"];
//
// UIColor+HexString.h
// Class to convert hex string to UIColor
// Support #RGB # ARGB #RRGGBB #AARRGGBB
// Usage: [UIColor colorWithHexString:@"#f5e6a1"];
// Created by Zhu Yuzhou on 1/20/13.
//
#import <UIKit/UIKit.h>
@junrillg
junrillg / paypalCurrencySelectDropDown.html
Last active November 20, 2015 20:50 — forked from biswarupadhikari/paypalCurrencySelectDropDown.html
Paypal Currency Select Drop Down
<select name="currency_code">
<option value="">Select Currency</option>
<option value="AUD">Australian Dollar</option>
<option value="BRL">Brazilian Real </option>
<option value="CAD">Canadian Dollar</option>
<option value="CZK">Czech Koruna</option>
<option value="DKK">Danish Krone</option>
<option value="EUR">Euro</option>
<option value="HKD">Hong Kong Dollar</option>
<option value="HUF">Hungarian Forint </option>
@junrillg
junrillg / README.md
Created October 13, 2015 06:43 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
<?php
// Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php)
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' );
function woocommerce_header_add_to_cart_fragment( $fragments ) {
ob_start();
?>
<a class="cart-contents" href="<?php echo WC()->cart->get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>
<?php
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version '>= 1.5.1'
Vagrant.configure('2') do |config|
config.vm.box = 'roots/bedrock'
# Required for NFS to work, pick any local IP
config.vm.network :private_network, ip: '192.168.50.5'

###Prerequesites

Install flightplan globally

npm install -g flightplan

Install flightplan in your project folder

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html