Skip to content

Instantly share code, notes, and snippets.

View svjunic's full-sized avatar
🐬

sv.junic svjunic

🐬
View GitHub Profile
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@uupaa
uupaa / get.path.for.node.js.md
Last active December 5, 2023 11:18
node.js で絶対パスや相対パスを取得する方法 npm __dirname

node.js でパスを取得する方法についてのメモ

$ node ~/hoge/Foo.js/a.js

を実行したときに、

  • process.argv[1] から、node コマンドに指定された a.js のパス( ~/hoge/Foo.js/a.js )を取得できます
@mugyu
mugyu / vimscript_debug.vim
Created June 1, 2014 22:37
vimscript の デバッグをする時のあれやこれや
#
# Learn Vimscript the Hard Way - Echoing Messages
# http://learnvimscriptthehardway.stevelosh.com/chapters/01.html
#
echomsg string(obj)
:message
"
@raimon49
raimon49 / vim_install_log_on_xrea.sh
Last active December 14, 2015 22:59
XREAの新規サーバでVimをインストール。XREA+お試し期間にしておかないとquotaで死ぬ。cat patches/7.3.* | patch -p0だとパッチあてるのに失敗するのでfor文で。
# Vim本体の取得
$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
$ bunzip2 vim-7.3.tar.bz
$ tar xf vim-7.3.tar
# 最新のパッチを取得
$ cd vim73
$ mkdir patches
$ cd patches
$ curl -O 'http://ftp.nluug.nl/vim/patches/7.3/7.3.[001-861]'
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: rkorving@wizcorp.jp
var timeouts = {};
@thinca
thinca / neobundle
Created August 22, 2012 02:14
neobundle command
#!/bin/sh
if [ -z "$1" ]; then
echo Usage: $0 {config-file}
exit
fi
vim -N -u NONE -i NONE -V1 -e -s --cmd "source $1" --cmd NeoBundleInstall! --cmd qall!
@kylefiedler
kylefiedler / css.snippets
Last active November 7, 2019 16:42
Vim CSS Snippets
#Sass Snippets
snippet @i
@import "${1}";
snippet ext
@extend ${1};
snippet inc
@include ${1}(${2});${3}
snippet @m
@media ${1} {
${2}