git checkout master
git pull origin 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
/** | |
* Copyright (c) <YEAR> <YOUR NAME> | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without | |
* restriction, including without limitation the rights to use, | |
* copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following |
git checkout master
git pull
git checkout <your-branch>
git rebase master
- deal with conflicts, if any. (If we keep getting multiple conflicts here then there's probably a problem)
git push
(--force normally only needed if there were conflicts or history changes)git checkout master
git rebase <your-branch>
git push
(--force normally only needed if there were conflicts or history changes)
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
[pretty] | |
secure = "%C(yellow)commit %H%n%C(white)Author: %an %nDate: %ad%n%n%w(0,4,4)%B%n" | |
[format] | |
pretty = secure |
There are currently three ways to declare a variable in modern day Javascript. Each method has it's own reasons for why you would want to use them. What follows here is an objective look at each method of declaring a variable (or constant).
When the javascript engine encounters a var
in code, it does what is known
as hoisting
. Let's first define what the english definition of hoisting
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 parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
function gpo() { | |
# Usage: gpo this # pushes the currently checked out branch | |
# Usage: gpo main # pushes main | |
# Usage: gpo this --force [... any other git push flags here ...] | |
if [[ $1 -eq "this" ]]; then | |
B=$(parse_git_branch | cut -d'(' -f 2 | cut -d')' -f 1 | sort); | |
shift 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
const messages = ['Good evening', 'Hey hows it goin?', 'Great', 'Cool', 'k, well, see ya!', 'late']; | |
async function sendMessage(msg){ | |
console.log(`Sending message: "${msg}"...`); | |
await sleep(4000); | |
console.log(`msg(${msg}) sent!`); | |
} | |
(async () => { | |
await messages.reduce(async (previousPromise, message) => { |
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 | |
astyle -A2 -t -xn -xc -xl -xk -xV -C -xG -S -K -N -M80 -U -W1 -j --suffix=none $@ |
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
#include <pcap.h> | |
#include <net/ethernet.h> | |
#include <netinet/in.h> | |
#include <netinet/ip.h> | |
#include <netinet/tcp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> |