Skip to content

Instantly share code, notes, and snippets.

View kyuumeitai's full-sized avatar

Álex Acuña Viera kyuumeitai

View GitHub Profile
@micc83
micc83 / skip-to-check-out.php
Last active October 28, 2024 06:18
Skip cart and redirect to direct checkout on WooCommerce
<?php
/**
* Skip cart and redirect to direct checkout
*
* @package WooCommerce
* @version 1.0.0
* @author Alessandro Benoit
*/
// Skip the cart and redirect to check out url when clicking on Add to cart
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@raae
raae / main.js
Last active August 29, 2015 13:59
Moment Timzone Support in Parse.com Cloud
// Read full blogpost explaining this at http://labs.lillyapps.no/2014/04/12/handle-timezones-parse-com
var moment = require('cloud/moment-timezone.js');
moment.tz.add(require('cloud/moment-timezone-data.js'));
Parse.Cloud.define("momentTest", function (request, response)
{
var osloSummerTime = moment.tz('2014-04-12 11:55', 'Europe/Oslo');
var osloWinterTime = moment.tz('2013-11-18 11:55', 'Europe/Oslo');
@passy
passy / yeoman_compass.md
Last active August 2, 2024 09:52
Using Yeoman with Compass Sprites

Yeoman + Compass Sprites

Setup

generator-webapp has support for compass out of the box. However, in order to use one of my favorite features of it — sprites and the image_url helper — you have to make some adjustments to the Gruntfile.

Let's assume you use a SASS stylesheet like this one:

@import "design/*.png"
@jcinis
jcinis / jquery.append.js
Created March 15, 2013 16:00
jQuery plugin to add event triggering to dom elements anytime they append or are appended. The reason for creating this is was to allow backbone.js views to be aware of their being added to the dom and to trigger post-render functionality.
/**
* Adds event triggering whenever an append takes place.
*
* - Parent is given an "append" trigger with the child as an arguement
* - Child is given an "appended" trigger with the parent as an argument
*
* @author Jessey White-Cinis <[email protected]>
*/
(function($) {
var jqueryAppend = $.fn.append;
@kyuumeitai
kyuumeitai / hack.sh
Created November 30, 2012 15:33 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 24, 2025 05:34
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 24, 2025 05:26
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 28, 2025 15:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#