Skip to content

Instantly share code, notes, and snippets.

View jcflim's full-sized avatar

Jensen Christian Lim jcflim

  • IMPACK
  • Philippines
View GitHub Profile
@jcflim
jcflim / gist:6573d78e775a28b446e4a74991782936
Created December 29, 2017 14:43
run specific migration on laravel
change path of migration
php artisan migrate --path=/database/migrations/selected/
@jcflim
jcflim / .gitignore
Created May 11, 2017 12:32 — forked from salcode/.gitignore
.gitignore file for a general web project - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20170502
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@jcflim
jcflim / svg.js
Created March 1, 2017 13:47 — forked from Tolmark12/svg.js
// Generated by CoffeeScript 1.10.0
(function() {
var SVGcompiler, console, svgCompiler;
console = {
log: function(str) {
return $.writeln(str);
}
};
@jcflim
jcflim / gist:145d86e7c920dc7e5f7188c7eb4d4383
Created February 10, 2017 14:10 — forked from pietia/gist:9661620
kill karma and gulp
kk() {
kill -9 $(ps aux | awk '/[k]arma/ {print $2}')
kill -9 $(ps aux | awk '/[g]ulp/ {print $2}')
}
/**
* Programmatically logs a user in
*
* @param string $username
* @return bool True if the login was successful; false if it wasn't
*/
function programmatic_login( $username ) {
if ( is_user_logged_in() ) {
wp_logout();
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@jcflim
jcflim / gist:5915083
Created July 3, 2013 02:49
Grails Generate Link outside of Controller or Taglib
// From http://mrhaki.blogspot.com/2012/01/grails-goodness-generate-links-outside.html
// File: grails-app/service/link/generator/LinkService.groovy
package link.generator
import org.codehaus.groovy.grails.web.mapping.LinkGenerator
class LinkService {
// Inject link generator
LinkGenerator grailsLinkGenerator