I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
;Iconify.scm | |
;=========================== | |
;Author...Giuseppe Bilotta | |
;Modified for Gimp 2.4.6+ by Ouch67 | |
;http://www.gimptalk.com/forum/broken-scripts-t33501.html | |
;Resubmission to Gimp Plugin Registry & GimpTalk by Gargy | |
;Modified for Gimp 2.8 by Roland Clobus | |
;------------ | |
;Description...: Iconify plug-in converts a single layer of a single image into a multi-layered image ready to be saved as a Windows icon. | |
;The new image will contain all standard sizes (16x16, 32x32, 48x48) at all standard bit depths (16 colors, 256 colors, 32-bit RGBA), with transparency support. |
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
local TICKRATE = 1/60 | |
function love.update(dt) | |
end | |
function love.draw(dt) | |
end | |
function love.run() | |
if love.math then |
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 | |
# Install required packages from Homebrew | |
brew tap homebrew/dupes | |
brew install coreutils binutils diffutils ed findutils gawk gnu-indent gnu-sed \ | |
gnu-tar gnu-which gnutls grep gzip screen watch wdiff wget bash gdb gpatch \ | |
m4 make nano file-formula git less openssh python rsync svn unzip vim \ | |
--default-names --with-default-names --with-gettext --override-system-vi \ | |
--override-system-vim --custom-system-icons | |
brew cleanup |
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 <iostream> | |
#ifdef __linux__ | |
#include <SDL2/SDL.h> | |
#elif defined(_WIN32) | |
#include <SDL.h> | |
#endif | |
const int WIN_WIDTH = 640; | |
const int WIN_HEIGHT = 480; |
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 <SDL2/SDL.h> | |
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav" | |
// prototype for our audio callback | |
// see the implementation for more information | |
void my_audio_callback(void *userdata, Uint8 *stream, int len); | |
// variable declarations | |
static Uint8 *audio_pos; // global pointer to the audio buffer to be played |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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 | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |