This file contains hidden or 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
| # There are 3 levels of git config; project, global and system. | |
| # project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
| # global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
| # system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
| # Create a project specific config, you have to execute this under the project's directory. | |
| $ git config user.name "John Doe" | |
| # Create a global config |
This file contains hidden or 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 | |
| PYTHONVER=2.7 | |
| PYTHON=python${PYTHONVER} | |
| mkdir -p $HOME/{bin,tmp,lib/$PYTHON} | |
| easy_install-${PYTHONVER} pip | |
| pip2.7 install virtualenv --no-use-wheel | |
| pip2.7 install --install-option="--user" virtualenvwrapper --no-use-wheel | |
| # Update $HOME/.bashrc with appropriate environment variables | |
| echo 'export PATH="$HOME/bin:$PATH"' >> $HOME/.bashrc |
This file contains hidden or 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 bash | |
| #### | |
| # Invoke with | |
| # $ bash_colours [limit] | |
| ### | |
| if hash tput >/dev/null 2>&1; then | |
| bound=${1:-255} | |
| for (( i = 0; i < bound; i++ )); do |
This file contains hidden or 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
| <!-- image --> | |
| <figure {{ if isset .Params "class" }}class="{{ index .Params "class" }}"{{ end }}> | |
| {{ if isset .Params "link"}}<a href="{{ index .Params "link"}}">{{ end }} | |
| <img src="{{ index .Params "src" }}" {{ if or (isset .Params "alt") (isset .Params "caption") }}alt="{{ if isset .Params "alt"}}{{ index .Params "alt"}}{{else}}{{ index .Params "caption" }}{{ end }}"{{ end }} /> | |
| {{ if isset .Params "link"}}</a>{{ end }} | |
| {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} | |
| <figcaption>{{ if isset .Params "title" }} | |
| <h4>{{ index .Params "title" }}</h4>{{ end }} | |
| {{ if or (isset .Params "caption") (isset .Params "attr")}}<p> | |
| {{ index .Params "caption" }} |
This file contains hidden or 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 python | |
| # coding: UTF-8 | |
| import socket | |
| import struct | |
| DEBUG = True | |
| DEBUG2 = False | |
| PTP_OC_GetDeviceInfo = 0x1001 |
This file contains hidden or 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
| #!ruby | |
| # | |
| # THETAのシャッターをPCから遠隔で切るだけの例 by GOROman | |
| # | |
| # 参考にしたページ | |
| # http://mobilehackerz.jp/contents/Review/RICOH_THETA | |
| require 'socket' |
This file contains hidden or 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
| var doc = app.activeDocument; | |
| var docPath = doc.path; | |
| function loadUrl(url, callback) { | |
| var bt = new BridgeTalk(); | |
| bt.target = 'bridge' ; |
This file contains hidden or 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
| <?php | |
| if ( ! function_exists('foo_setup')) { | |
| function foo_setup() { | |
| add_theme_support(...); | |
| add_theme_support(...); | |
| } |
This file contains hidden or 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
| function curlies(element) { | |
| function smarten(text) { | |
| return text | |
| /* opening singles */ | |
| .replace(/(^|[-\u2014\s(\["])'/g, "$1\u2018") | |
| /* closing singles & apostrophes */ | |
| .replace(/'/g, "\u2019") | |
| /* opening doubles */ |
This file contains hidden or 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
| # Working as of Jekyll 1.0.3 | |
| module Jekyll | |
| class WrapHighlightBlock < Jekyll::Tags::HighlightBlock | |
| def initialize(tag_name, markup, tokens) | |
| super | |
| end | |
| def render(context) | |
| '<figure class="code"><figcaption></figcaption>' + super + '</figure>' |