Skip to content

Instantly share code, notes, and snippets.

:octocat:
Writing YAML + HCL and googling errors

Julien Bisconti veggiemonk

:octocat:
Writing YAML + HCL and googling errors
Block or report user

Report or block veggiemonk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@veggiemonk
veggiemonk / install_font_scp.sh
Created Jul 2, 2015
install source code pro font in Ubuntu 14.04.2
View install_font_scp.sh
#!/bin/sh
echo "installing fonts at $PWD to ~/.fonts/"
mkdir -p ~/.fonts/adobe-fonts/source-code-pro
git clone https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
# find ~/.fonts/ -iname '*.ttf' -exec echo \{\} \;
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro
echo "finished installing"
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
View gist:696508a6009a25e52c81
# from hyphen/dash to camelCase
rename 's/-(\w)/\U$1/g' list-of-files
# from camelCase to hyphen/dash
sed -e 's/\([A-Z]\)/-\L\1/g' -e 's/^-//' <<< "MyDirectoryFileLine"
View notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@veggiemonk
veggiemonk / cb-in
Last active Aug 29, 2015 — forked from Gen2ly/cb-in
Copy file or pipe to Xorg clipboard
View cb-in
#!/bin/bash
# Copy file or pipe to Xorg clipboard
# Required program(s)
req_progs=(xclip)
for p in ${req_progs[@]}; do
hash "$p" 2>&- || \
{ echo >&2 " Required program \"$p\" not installed."; exit 1; }
done
@veggiemonk
veggiemonk / cb-out
Last active Aug 29, 2015 — forked from Gen2ly/cb-out
Paste contents of Xorg clipboard to a file from the command line
View cb-out
#!/bin/bash
# Paste contents of Xorg clipboard to a file from the command line
filename=$@
pasteinfo="clipboard contents"
# Display usage if no parameters given
if [[ -z "$@" ]]; then
echo " ${0##*/} <filename> - paste contents of context-menu clipboard to file"
exit
View todo-list.md

Main

Mind Blown [Mind Blown2

  • use gist as a todo list
    • write a cli to access gists from terminal
    • analysis: how to edit it easily and securely

Server

  • install gitlab
    • connect to github
    • create projects
@veggiemonk
veggiemonk / nginxproxy.md
Last active Aug 29, 2015 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

You can’t perform that action at this time.