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
UF | Municipio | Desambiguação | |
---|---|---|---|
GO | Abadia de Goiás | ||
MG | Abadia dos Dourados | ||
GO | Abadiânia | ||
MG | Abaeté | Abaeté (Minas Gerais) | |
PA | Abaetetuba | ||
CE | Abaiara | ||
BA | Abaíra | ||
BA | Abaré | ||
PR | Abatiá |
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
npm i -g nvm express express-generator tape mocha grunt gulp swagger pm2 cheerio istanbul bower nodemon jade | |
npm cache clean -g |
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
(MiB) Sector Type FS | |
------------------------------ | |
8192 (swap) primary ext4 | |
2048 /boot primary ext4 | |
262144 / primary ext4 | |
* /home logical ext4 |
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
http://serverfault.com/questions/224810/is-there-an-equivalent-to-ssh-copy-id-for-windows | |
These answers didn't help me out. I really didn't need any crazy scripts. I had created a public key on my client machine in git bash and was trying to copy it to a VPS. | |
After creating your public key, the key should be stored as "(whatever folder you started in)/.ssh/id_rsa.pub" | |
So use this command: | |
cat ~/.ssh/id_rsa.pub | ssh user@123.45.67.89 "cat >> ~/.ssh/authorized_keys" where user is your username (sometimes "root", or whatever you may have set up), and replace 123.45.67.89 with your machine / host / VPS's IP address. | |
If the directory .ssh is not yet created on the host machine, use this small variation: |
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 | |
cat ~/.ssh/id_rsa.pub | (ssh user@host "cat >> ~/.ssh/authorized_keys") |
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
number = positive integer ; | |
bitstring = "" | |
while (number > 0 ) | |
{ | |
bit = number mod 2 ; | |
quotient = number div 2 ; // or "n * 0.5" or "n >>> 1" (verify precision for large ints) | |
put bit to the left of any previous bits in the bitstring; | |
number = quotient ; | |
} |
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 | |
git config --global credential.helper 'cache --timeout=3600' | |
git config --global user.name "Leo Dutra" | |
git config --global user.email "leodutra.br@gmail.com" | |
echo 'git has been set for leodutra.br@gmail.com' |
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
.js-filtered-highlight { | |
color: yellow; | |
} |
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 regexMultiMatch(str, regex, fn) { | |
// clone for no regex.lastIndex problems | |
var cloneRegExp = new RegExp(regex.source, regex.flags || | |
(regex.global ? 'g' : '') + (regex.ignoreCase ? 'i' : '') + (regex.multiline ? 'm' : '')) | |
fn.apply(null, regex.exec(str)) | |
if (regex.global) { | |
var match | |
while((match = regex.exec(str))) fn.apply(null, match) |
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
/** | |
* Find the closest package.json file, starting at process.cwd (by default), | |
* and working up to root. | |
* | |
* @param {string} [startDir=process.cwd()] Starting directory | |
* @returns {string} Absolute path to closest package.json file | |
*/ | |
function findPackageJson(startDir) { | |
var dir = path.resolve(startDir || process.cwd()); |