gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
/****** I've created a Chrome extension from this script, take a look at https://github.com/LoranKloeze/WhatsAllApp ********/ | |
/* | |
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses | |
Floated div edition | |
01-05-2017 | |
(c) 2017 - Loran Kloeze - loran@ralon.nl | |
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds | |
of information from a range of phonenumbers. It doesn't matter if these numbers are part |
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 draftToText(obj) { | |
return new Promise((resolve, reject) => { | |
try { | |
const draftObj = typeof obj === 'string' ? JSON.parse(obj) : obj; | |
const completText = []; | |
for (let index = 0; index < draftObj.blocks.length; index++) { | |
completText.push(obj.blocks[index].text.trim()); | |
} | |
resolve(completText.join(' ')); | |
} catch (error) { |
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 NotificationSequence() { | |
const notifications = [] | |
const showNotifications = (notification) => { | |
Notification.requestPermission(function (permission) { | |
const n = new Notification(notification.title, notification) | |
setTimeout(() => { | |
n.close() | |
notifications.pop() | |
if (notifications.length) { | |
showNotifications(notifications[notifications.length - 1]) |
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 | |
# Adicione um novo remote; pode chamá-lo de "upstream": | |
git remote add upstream https://github.com/usuario/projeto.git | |
# Obtenha todos os branches deste novo remote, | |
# como o upstream/master por exemplo: | |
git fetch upstream |
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 | |
MONGO_DATABASE="your_db_name" | |
APP_NAME="your_app_name" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/username/backups/$APP_NAME" |
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
const localtunnel = require('localtunnel') | |
const tunels = [{ | |
subdomain: 'youDomain', | |
local_host: 'localhost', | |
port: 4000, | |
}, { | |
subdomain: 'youDomain', | |
local_host: 'localhost', | |
port: 3000, |
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
/** | |
* Baseaded in this issue | |
* @link https://github.com/webpack/webpack/issues/625 | |
*/ | |
import set from 'lodash/set'; | |
import trimStart from 'lodash/trimStart'; | |
const context = require.context('src/assets'); | |
const obj = {}; | |
context.keys().forEach(function(key) { |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
OlderNewer