git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
import imaplib, serial, struct, time | |
class Mail(): | |
def __init__(self): | |
self.user= 'USER' | |
self.password= 'PASS' | |
self.ser = serial.Serial('/dev/tty.usbmodem621', 9600) | |
self.M = imaplib.IMAP4_SSL('imap.gmail.com', '993') | |
self.M.login(self.user, self.password) | |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
var request = require('request'); | |
var unzip = require('unzip'); | |
var csv2 = require('csv2'); | |
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
.pipe(unzip.Parse()) | |
.on('entry', function (entry) { | |
entry.pipe(csv2()).on('data', console.log); | |
}) | |
; |
# List of conferences | |
curl -d {} -H "Content-Type:application/json" https://eventboard.falafel.com/ConferenceService2/ConferenceListEx | |
# The 59 specifies the version according to the latest version that is present in the DataVersion attribute of the conference list above | |
curl http://cdn.eventboard.falafel.com/conferencecatalogs/codemash2014.59.data.json |
Several of the programs I write for Sonic Pi push it fairly close to the limit when run on a Raspberry Pi. This note gives some tips on to how to maximise the performance on that platform. Of course, if you run Sonic Pi on Mac OSX,or a Windows PC then the performance is much better on these more powerful platforms and some of the issues may not arise.
By increasing the voltage applied to the Pi processor, and running it at a higher clock frequency than normal it is possible to achive significant gains in performance. The down side is that you may reduce the lifetime of your Pi. There are five levels that can be configured: None, Modest, Medium, High and Turbo. I routinely run my Raspberry Pis with Medium Overclocking and have noticed no ill effects on any of them.
If you wish to apply some over-clocking you do so by running the program raspi-config from the command line. Having logged on, from the command line before you start the gra
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64
.vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
[{"Id":3663,"SessionTime":"0001-01-01T00:00:00","SessionStartTime":"2016-01-05T09:00:00","SessionEndTime":"2016-01-05T10:00:00","Room":null,"Rooms":["Acacia - Sessionz"],"Title":"Kidz‐in‐3D","Abstract":"Make a tetrahedron with 6 toothpick. Make 4 of these and you have one 2 high.\r\n\r\nMake 4 of these and you have one 4 high. Make 4 of these and you have one 8\r\n\r\nhigh. Make 4 of these and you have one 16 high. Within an short time, we can\r\n\r\nhave one as tall as a child.","SessionType":"Kidz Mash","Tags":["Other"],"Category":"Programming Principles","Speakers":[{"Id":"3a7a56bf-23b2-49a9-b8e5-95767941ca5a","FirstName":"Aydin","LastName":"Akcasu","GravatarUrl":"//www.gravatar.com/avatar/f9da7b144fc14837d2f3599c21de129f"}]},{"Id":3675,"SessionTime":"0001-01-01T00:00:00","SessionStartTime":"2016-01-05T10:30:00","SessionEndTime":"2016-01-05T11:30:00","Room":null,"Rooms":["Acacia - Sessionz"],"Title":"The Magic of Glycerin","Abstract":"Bubbles that bounce? Homemade soap? Snow globes and bathtub crayons? Wha |
server { | |
listen 80; | |
listen [::]:80; | |
server_name robertnealan.com; | |
root /var/www/ghost/system/nginx-root; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |