This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim | |
:args `ls` | |
:argdo %s#SEARCH#REPLACE#gec |update | |
First character afer %s is used as separator | |
git ls-files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
</head> | |
<script> | |
$(document).ready(function() { | |
jQuery.support.cors = true; | |
var states = ["01", "02", "04", "05", "06", "08", "09", "10", "11", "12", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "44", "45", "46", "47", "48", "49", "50", "51", "53", "54", "55", "56", "72"]; | |
var api_key = '5e562d947f0fb77549cb73938cf1bec320ebe37e'; | |
var url = "https://api.census.gov/data/2015/pep/population"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="author" content="Yi-Fan Zhang" /> | |
<title>Palindromes</title> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
deps="" | |
find_deps() | |
{ | |
bin=$1 | |
while read lib; do | |
lib=${lib%%\(*\)} | |
lib=${lib%%[[:space:]]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://communities.vmware.com/docs/DOC-8970 | |
config.vm.provider "vmware_fusion" do |v| | |
# Enable hardware virtualization in vmware fusion | |
v.vmx["vhv.enable"] = "TRUE" | |
# Maybe needed for KVM | |
v.vmx["vcpu.hotadd"] = "FALSE" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/7004702/how-can-i-create-a-makefile-for-c-projects-with-src-obj-and-bin-subdirectories | |
# ------------------------------------------------ | |
# Generic Makefile | |
# | |
# Author: [email protected] | |
# Date : 2011-08-10 | |
# | |
# Changelog : | |
# 2010-11-05 - first version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Somehow this evaluates to true ... | |
",,," == new Array(4); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Undo last commit and put changes into staging | |
git reset --soft HEAD^ | |
# Change the last commit | |
git commit --amend -m "Oops, forgot to add this to last commit" | |
# Totally undo the last commit | |
git reset --hard HEAD^ | |
# Undo local changes to a file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash.profile | |
# .bash_profile is executed for login shells | |
# .bashrc is executed for non-login shells | |
# However, Mac OS X’s Terminal.app runs a login shell by default for each | |
# new terminal window, calling .bash_profile instead of .bashrc | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |
NewerOlder