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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var outfile = "primes.txt"; | |
var count = 0; | |
var maxCount = 100; | |
var primes = []; | |
var i = 2; |
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
set nocompatible | |
"Enable filetypes | |
filetype on | |
filetype plugin on | |
filetype indent on | |
syntax on | |
"Write the old file out when switching between files. | |
set autowrite |
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
SSMA | |
General Solutions for migration | |
1. Update Mysql DB | |
2. SSMA > Table > Refresh from DB | |
3. SSMA > Table > Convert Schema | |
4. SSMA > SQL Server Table > Synchronize with Database | |
5. SSMA > MySQL Table > Migrate Data | |
6. Apply previous MySQL logic in MSSQL equivalent (most should be possible) in separate query |
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
<string name="link"> <![CDATA[<a href="%1$s"><u>%2$s</u></a>]]> </string> |
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
var url = location.origin; | |
var form = $('').serialize(); | |
$.ajax({ | |
url: url, | |
type: 'post', | |
dataType: 'json', | |
data: form, | |
}).done(function(data){ | |
console.log("success"); |
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 array_keys_i($array, $str){ | |
$results = array(); | |
foreach($array as $key => $value) { | |
if(stristr($str,$value)) { | |
$results[] = $key; | |
} | |
} | |
if(empty($results)) { |
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 | |
# chmod +x initial_setup.sh | |
# sudo ./initial_setup.sh | |
sudo apt-get install -y \ | |
curl \ | |
vim \ | |
git \ | |
alacarte \ |
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/bash | |
# zsh | |
# uninstall_oh_my_zsh | |
curl -L github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh | |
# http://bahoom.com/hyperswitch | |
defaults write com.apple.Finder AppleShowAllFiles TRUE | |
killall Finder |
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 walkTheDOM(node, func) { | |
func(node); | |
node = node.firstChild; | |
while (node) { | |
walkTheDOM(node, func); | |
node = node.nextSibling; | |
} | |
} |
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 dom(name, attributes) { | |
var node = document.createElement(name); | |
if (attributes) { | |
forEachIn(attributes, function(name, value) { | |
setNodeAttribute(node, name, value); | |
}); | |
} | |
for (var i = 2; i < arguments.length; i++) { | |
var child = arguments[i]; | |
if (typeof child == "string") |
NewerOlder