Skip to content

Instantly share code, notes, and snippets.

View xgenvn's full-sized avatar

TuNA xgenvn

View GitHub Profile
@xgenvn
xgenvn / ide_helper.php
Created July 8, 2012 18:02
Laravel3 IDE Helper
<?php
class Auth extends Laravel\Auth {}
/**
* @method static add(string $name, string $source, array $dependencies = array(), array $attributes = array())
* @method static string styles()
* @method static string scripts()
*/
class Asset extends Laravel\Asset {}
class Autoloader extends Laravel\Autoloader {}
class Bundle extends Laravel\Bundle {}
/*
See dev dependencies https://gist.github.com/isimmons/8927890
Compiles sass to compressed css with autoprefixing
Compiles coffee to javascript
Livereloads on changes to coffee, sass, and blade templates
Runs PHPUnit tests
Watches sass, coffee, blade, and phpunit
Default tasks sass, coffee, phpunit, watch
*/
@xgenvn
xgenvn / 0_reuse_code.js
Created August 7, 2014 15:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@xgenvn
xgenvn / app.js
Last active September 8, 2015 02:40 — forked from kim3er/app.js
Knockout with Sammy (http://learn.knockoutjs.com/#/?tutorial=webmail)
function WebmailViewModel() {
// Data
var self = this;
self.folders = ['Inbox', 'Archive', 'Sent', 'Spamh'];
self.chosenFolderId = ko.observable();
self.chosenFolderData = ko.observable();
self.chosenMailData = ko.observable();
// Behaviours
self.goToFolder = function(folder) { location.hash = folder };
@xgenvn
xgenvn / amap with english and chinese
Last active November 20, 2015 05:04
amap with english and chinese
<div style="display:none" id="amap-container">
<h3 class="box-header">Map</h3>
<div style="height: 400px; margin-top: 10px;" id="myMap">
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=KEY"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
var s1 = "LONG";
var s2 = "LAT";
@xgenvn
xgenvn / bottle_example.py
Created November 22, 2015 16:48 — forked from Arthraim/bottle_example.py
a python web framework bottle's example
#coding: utf-8
from bottle import route, error, post, get, run, static_file, abort, redirect, response, request, template
@route('/')
@route('/index.html')
def index():
return '<a href="/hello">Go to Hello World page</a>'
@route('/hello')
def hello():
@xgenvn
xgenvn / tmux-cheatsheet.markdown
Created May 12, 2016 16:32 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@xgenvn
xgenvn / clink.lua
Last active November 23, 2016 02:03
Support conda env on cmder prompt and some custom lamb chars
@xgenvn
xgenvn / _vimrc
Last active December 22, 2016 17:22 — forked from aburok/_vimrc
Vim common configuration for GVim and VsVim
augroup filetype_vim
autocmd!
autocmd FileType vim setlocal foldmethod=marker
augroup END
" Vim ESCAPE Combinations{{{
imap jj <esc>
imap <S-Space> <Esc>
vnoremap <S-Space> <Esc>
" }}}
Severity Code Description Project File Line Suppression State
Error The command ""C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\Unity\Tools\AssemblyConverter.exe" -platform=uap -lock="C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\project.lock.json" -bits=32 -configuration=Release -removeDebuggableAttribute=False -path="." -path="..\Players\UAP\x86\Release" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\Assembly-CSharp.dll" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\Assembly-CSharp-firstpass.dll" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\UnityEngine.dll" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\UnityEngine.UI.dll" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHololensExample\UnityEngine.HoloLens.dll" "C:\Users\brian\Documents\Projects\VuforiaHololensExample\App\VuforiaHo