This guide aims to walk you through setting up an environment for doing C++ development on Windows using cygwin, gvim, and the mighty command prompt.
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
#!/usr/bin/env ruby | |
# Example usage: | |
# $ cat <<EOS | this_script | |
# 16:47 | |
# 23:59 | |
# 00:08 | |
# end | |
# EOS | |
# |
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
#!/usr/bin/env ruby | |
# Example usage in zsh: | |
# | |
# mplayer ${(f@)"$( this_script ~/Music/*.mp3 )"} | |
require 'slop' | |
opts = Slop.parse do |o| | |
o.integer '-s', '--sample', 'Number of samples to take', default: 0 |
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 | |
# Usage: Run this script with -h for help. | |
# | |
# License: {{{ | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> |
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
#!/usr/bin/env zsh | |
local opts addr | |
opts='--incognito' | |
while getopts 'hs:g:n' flag; do | |
case "$flag" in | |
n) | |
opts='' | |
;; |
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
#!/usr/bin/env zsh | |
# Depending on the version of zplug that you are currently using, this | |
# function symlinks the other zplug version to $ZPLUG_HOME. | |
# | |
# $ git clone https://github.com/b4b4r07/zplug ~/.zplug_v1 | |
# $ git clone https://github.com/b4b4r07/zplug2 ~/.zplug_v2 | |
# $ source ~/.zplug_v1/zplug | |
# $ source this_script | |
# # Use v2 |
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
source 'https://rubygems.org' | |
gem 'nokogiri' | |
gem 'slop' |
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/sh | |
S='tm-normal' | |
tmux new-session -d -s $S -n 'local' | |
tmux new-window -t $S:1 -d -n 'remote' | |
tmux new-window -t $S:2 -d -n 'programming' | |
tmux new-window -t $S:3 -d -n 'misc' | |
tmux new-window -t $S:4 -d -n 'others' | |
tmux new-window -t $S:5 -d -n 'stuff' |
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> | |
int main(int argc, char const* argv[]) { | |
int foo(); | |
int& bar(); | |
int* baz(); | |
delete &(bar()); | |
delete baz(); |
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> | |
#include <queue> | |
struct Foo { | |
Foo(const int x) : x(x) {} | |
int x; | |
}; | |
std::ostream& operator<<(std::ostream& os, const Foo& f) { | |
os << f.x; |