This file contains 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/sh | |
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
#---------------------------------------------------- | |
# a simple mysql database backup script. | |
# version 2, updated March 26, 2011. | |
# copyright 2011 alvin alexander, http://devdaily.com | |
#---------------------------------------------------- | |
# This work is licensed under a Creative Commons | |
# Attribution-ShareAlike 3.0 Unported License; |
This file contains 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
declare @table table(id int, strings nvarchar(400)) | |
insert into @table (id, strings) | |
select 1, 'abc,def,ghi' | |
union all | |
select 2, 'jkl' | |
union all | |
select 3, 'mno,pqr' | |
select * from @table |
This file contains 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
CREATE TABLE #TestData ( | |
id int not null identity(1,1) primary key, | |
account varchar(10) not null, | |
deposit int not null | |
); | |
INSERT INTO #TestData (account, deposit) VALUES ('Vacation', 10) | |
INSERT INTO #TestData (account, deposit) VALUES ('Vacation', 20) | |
INSERT INTO #TestData (account, deposit) VALUES ('Vacation', 30) | |
INSERT INTO #TestData (account, deposit) VALUES ('Bills', 40) | |
INSERT INTO #TestData (account, deposit) VALUES ('Bills', 50) |
This file contains 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
function unique(value, index, self) { | |
return self.indexOf(value) === index; | |
} |
This file contains 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
function cartesianProductOf() { | |
return Array.prototype.reduce.call(arguments, function(a, b) { | |
var ret = []; | |
a.forEach(function(a) { | |
b.forEach(function(b) { | |
ret.push(a.concat([b])); | |
}); | |
}); | |
return ret; | |
}, [[]]); |
This file contains 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
[ | |
{"r":"353a81d9-091e-479c-9b07-fc1e271d91a5","s":169359380359,"t":1406294298153,"m":"94.18.214.22 aog5x7dc INFO 'MediaDeviceService.getDevices.devices.video [\"FaceTime HD Camera (Display) (05ac:1112)\",\"FaceTime HD Camera (PUF6:VVDR)\"]'"}, | |
{"r":"353a81d9-091e-479c-9b07-fc1e271d91a5","s":123643402383,"t":1406294317904,"m":"66.225.159.5 3197oner INFO 'MediaDeviceService.getDevices.devices.video []'"}, | |
{"r":"353a81d9-091e-479c-9b07-fc1e271d91a5","s":71475116496,"t":1406294381007,"m":"69.14.193.178 qu2r7yz2 INFO 'MediaDeviceService.getDevices.devices.video [\"FaceTime HD Camera (Built-in) (05ac:8509)\"]'"}, | |
{"r":"353a81d9-091e-479c-9b07-fc1e271d91a5","s":169458215047,"t":1406294454260,"m":"12.168.155.42 dolfhlfu INFO 'MediaDeviceService.getDevices.devices.video [\"Integrated Webcam (0c45:6433)\"]'"}, | |
{"r":"353a81d9-091e-479c-9b07-fc1e271d91a5","s":123786187023,"t":1406294521582,"m":"69.14.193.178 qu2r7yz2 INFO 'MediaDeviceService.getDevices.devices.video [\"FaceTime HD Camera (Built-in) (05ac:8509)\"]'"}, | |
{"r |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
</body> | |
</html> |
This file contains 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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
# Programs | |
# ------------------------------------------------------------------------------ | |
alias subl="open -a /Applications/Sublime\ Text\.app" | |
alias vsc="open -a /Applications/Visual\ Studio\ Code.app" | |
alias sim="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" | |
# less syntax highlight | |
LESSPIPE=`which src-hilite-lesspipe.sh` |
This file contains 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
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
br = branch | |
alias = config --get-regexp alias | |
lg = log --graph --decorate --pretty=oneline --abbrev-commit | |
lgf = log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative | |
unstage = reset HEAD | |
uncommit = reset --soft HEAD^ |
This file contains 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |