Skip to content

Instantly share code, notes, and snippets.

View alice1017's full-sized avatar

Alice1017 alice1017

  • Tokyo, Japan
View GitHub Profile
@jtriley
jtriley / terminalsize.py
Created July 26, 2011 21:58
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
@KOBA789
KOBA789 / gist:1806530
Created February 12, 2012 05:25 — forked from novi/gist:1805373
Node.js 開発環境 基礎

Node.js 開発環境 基礎

Node.jsのインストール

OS X なら公式からインストーラをダウンロードしましょう。

http://nodejs.org/#download

nodeコマンドでnodeのインタプリタを起動。

@johanmeiring
johanmeiring / gist:3002458
Created June 27, 2012 08:32
"git lg" alias for pretty git log
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
@schmurfy
schmurfy / gist:3199254
Created July 29, 2012 14:33
Install pandoc Mac OS X 10.8
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
@Integralist
Integralist / 1. Example.scss
Created October 22, 2012 14:10
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@hayajo
hayajo / changelog_en.md
Last active July 19, 2024 05:47
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@inoshiro
inoshiro / git-push.py
Created February 9, 2013 08:01
git pushにhookを提供する。リポジトリの .git/hooks に pre-push か post-push が実行ファイルとして置いてあれば実行する
#!/usr/bin/env python
#coding: utf-8
import os
import subprocess
import sys
PRE_PUSH_SCRIPT = 'pre-push'
POST_PUSH_SCRIPT = 'post-push'
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@Kuniwak
Kuniwak / 2013_11_15_githubjp_note.markdown
Last active October 30, 2018 07:06
「GitHub トレーニングチームから学ぶ Git の内部構造」のノートです。 曖昧なところもあるので、間違いがあったら教えてください! http://connpass.com/event/3808/

GitHub トレーニングチームから学ぶ Git の内部構造

Graphs, Hashes, and Compression, Oh My!

Hash について

従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。

@dogrunjp
dogrunjp / Markup_markdown_with_jinja2.md
Last active November 30, 2015 15:14
PythonのテンプレートエンジンJinja2にMarkdownを読み込みレンダリングする方法

PythonのテンプレートエンジンJinja2にMarkdownを読み込みレンダリングする方法

タイトルの通りのことを色々試していたのでメモしておきます。

1)テンプレートフィルタの利用

Jinja2とMarkdownで検索して、 最初に見つけたのがDjango+Jinja2でMarkdown用のカスタムフィルタを使う方法。 テンプレートに関する部分はだいたいJinja2なので、Djangoに関係なくMarkdownを扱えます。