Skip to content

Instantly share code, notes, and snippets.

@john24318
john24318 / .vimrc
Last active September 24, 2020 01:59
vimrc for c/c++
" Install required tools on Linux
" sudo apt-get install ctags
" sudo apt-get install cscope
" sudo apt-get install vim-gnome
" sudo apt-get install silversearcher-ag
" set the runtime path to include Vundle and initialize
filetype off
set nocompatible
set backspace=indent,eol,start
@john24318
john24318 / gist:fa2edd970c7eb06021a9
Last active August 29, 2015 14:03
Force update scope in callback
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js"></script>
</head>
<body>
<div ng-controller="MyController">
<button id="load">Load products</button>
@john24318
john24318 / gist:7e6d61bfca295d93fc9a
Last active August 29, 2015 14:03
Compile Angular template in $(document).ready
<html ng-app>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.18/angular.min.js"></script>
</head>
<body>
<div>
<div id="ctrl" ng-controller="MyController"></div>
<div id="loader"></div>
</div>