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 | |
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 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 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 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 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 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 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 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 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>' |
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
/* Modern Font Stacks */ | |
/* System */ | |
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
/* System (Bootstrap 5.2.0) */ | |
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
/* Times New Roman-based serif */ | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; |