Skip to content

Instantly share code, notes, and snippets.

View takahiro47's full-sized avatar

Takahiro Tsuchiya takahiro47

  • CPSF, Tokuda Lab, Environment and Information Studies, Keio University SFC.
  • Tokyo, Japan
View GitHub Profile
@febuiles
febuiles / songs.md
Last active July 1, 2022 03:45
Fetching lyrics in Unix

Fetching lyrics in the command line

Objective: Print the lyrics for the current playing song.

How: We'll create a small bash script to do the fetching for us (using curl) and then we'll display it either in the terminal or in our $EDITOR

Get the current song

First we'll need to get the name of the current song and its artist:

@mathias
mathias / buttons.coffee
Created January 30, 2012 15:31
Haml + Coffeescript Tweet button and Like button
((d, s, id) ->
js = undefined
fjs = d.getElementsByTagName(s)[0]
return if d.getElementById(id)
js = d.createElement(s)
js.id = id
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"
fjs.parentNode.insertBefore js, fjs
) document, "script", "facebook-jssdk"
@zxcvbnm4709
zxcvbnm4709 / gist:2656197
Created May 10, 2012 22:06
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@rezwyi
rezwyi / google.analytics.js.coffee
Last active January 16, 2017 11:35
Google Analytics script in CoffeeScript
# See http://stackoverflow.com/questions/4214731/coffeescript-global-variables
root = exports ? this
root._gaq = [['_setAccount', 'UA-xxxxxxxx-y'], ['_trackPageview']]
insertGAScript = ->
ga = document.createElement 'script'
ga.type = 'text/javascript'
ga.async = true
proto = document.location.protocol
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@wm
wm / Powerline.md
Last active September 6, 2022 00:55
Installing powerline on Mac OSX. The following was done in version Version 10.8.2

Install dependencies

brew install cmake
brew install python
sudo easy_install pip

Add powerline bin to your path. In your zshrc file (or the paths files sourced in zshrc) add the following line

PATH="/usr/local/share/python/:$PATH"

Reinstall MacVim with brew

@takahiro47
takahiro47 / Preferences.sublime-settings.json
Last active December 20, 2015 16:19
The setting of SublimeText2.app
{
"auto_indent": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": true,
"disable_formatted_linebreak": true,
"disable_tab_abbreviations": true,
"font_size": 12.0,
"font_face": "Ricty",
"highlight_trailing_spaces_color_name": "invalid",
"ignored_packages":
$ ->
##
## Social Plugins ##
# Facebook Like Button
((d, s, id) ->
js = undefined
fjs = d.getElementsByTagName(s)[0]
return if d.getElementById(id)
js = d.createElement(s)

Glide Help

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

Keyboard shortcuts:

  • : go backward.
  • : go forward.
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
## OS generated files
## -------------------------------------------
# Linux