Wrapping console.log
(et al.) in your own function to modify logging behavior.
You may want a simple way to:
If you want to achieve greatness stop asking for permission. ~Anonymous | |
Things work out best for those who make the best of how things work out. ~John Wooden | |
To live a creative life, we must lose our fear of being wrong. ~Anonymous | |
If you are not willing to risk the usual you will have to settle for the ordinary. ~Jim Rohn | |
Trust because you are willing to accept the risk, not because it's safe or certain. ~Anonymous | |
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. ~Swami Vivekananda | |
All our dreams can come true if we have the courage to pursue them. ~Walt Disney | |
Good things come to people who wait, but better things come to those who go out and get them. ~Anonymous | |
If you do what you always did, you will get what you always got. ~Anonymous | |
Success is walking from failure to failure with no loss of enthusiasm. ~Winston Chu |
Here are some details about how I made this timelapse video with a GoPro and a Mac. It wasn't as straight-forward as I thought it would be, so I wanted to share what I learned.
As you can see from the video, the subject was me building a wooden mechanical 3D puzzle which took me nearly 18 hours to build. I took a photo once every 5 seconds which yeilded more than 12.7k photos.
Here's what I used to make a timelapse video.
// ==UserScript== | |
// @name Strava Quick Manual Entry | |
// @version 0.1.1 | |
// @description Adds an input box to the manual entry page allowing for quick entry of an activity | |
// @author robert.mcgui@gmail.com | |
// @match https://www.strava.com/upload/manual | |
// @icon https://d3nn82uaxijpm6.cloudfront.net/favicon-32x32.png | |
// @grant none | |
// @sandbox JavaScript | |
// @downloadURL https://gist.githubusercontent.com/robatron/5590620a5346715062301ebc0af0ed65/raw/sqme.user.js |
// ==UserScript== | |
// @name Slack Message Tweaks | |
// @version 0.0.2 | |
// @description Add absolute timestamps to messages, and swap app links for web links | |
// @author robert.mcgui@gmail.com | |
// @match https://app.slack.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// @sandbox JavaScript | |
// @downloadURL https://gist.githubusercontent.com/robatron/0e4fcda19f77b1b6471ea72cda96ca89/raw/slack-message-tweaks.user.js |
Use a git hook to match a Jira issue ID from the current branch, and prepend it to every commit message
Assuming the current branch contains a Jira issue ID, you can use a git hook script to prepend it to every commit message.
Create an empty commit-msg git hook file, and make it executable. From your project's root directory:
install -b -m 755 /dev/null .git/hooks/commit-msg
Save the following script to the newly-created .git/hooks/commit-msg file:
Fallout 1 was originally designed to run at 640x480 resolution. I wanted to run the Mac OS X version of Fallout on my MacBook 11", which has a 1366x768 display. There is a [high resolution patch][hi-res], but it only supports the Windows version of Fallout.
Turns out that the OS X version of Fallout runs through Wine, so we can get this patch working with just a few configuration changes:
Note for Fallout 2 users: The process for Fallout 2 is essentially the same, with a different patch, and some minor pathing differences. Other than that, the process is exactly the same!
A generalized depth and breadth-first tree search algorithm
Here's a neat little algorithm that can perform a depth-first search (DFS) or breadth-first search (BFS) by simply changing the collection data type:
search( Node root ) {
Collection c = new Collection()
c.push( root )
#!/bin/bash | |
# Remote script to install these dotfiles on a system | |
system_type=$(uname -s) | |
repo_url="https://robatron@bitbucket.org/robatron/dotfiles.git" | |
echo "Verifying git installed..." | |
if ! [ -x "$(command -v git)" ]; then |