Skip to content

Instantly share code, notes, and snippets.

@nongio-zz
nongio-zz / node-term-tools.md
Last active November 13, 2017 17:23
nodejs terminal UI tools

nodejs terminal UI tools

Inquirer A collection of common interactive command line user interfaces. Used by yeoman

terminal-menu used in rvagg/workshopper learnyounode...

cli-color used in rvagg/workshopper learnyounode...

blessed A curses-like library for node.js.

<script>
$(function(){
$('#image').reel({
indicator: 0, // For no indicator just remove this line
frames: 100,
frame: 6,
rows: 2,
row: 1,
speed: 0.1,
timeout: 3,
{
"Baden-Württemberg":[
"02.11.2015",
"03.11.2015",
"04.11.2015",
"05.11.2015",
"23.12.2015",
"24.12.2015",
"25.12.2015",
"26.12.2015",
References:
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/
https://github.com/cyu/rack-cors
http://nelm.io/blog/2011/11/cors-with-sencha-touch/
http://jessehowarth.com/2011/04/27/ajax-login-with-devise
=============================================================================================================
GEMFILE
=============================================================================================================
gem 'rack-cors', :require => 'rack/cors'
#!/usr/bin/env bash
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
$z-index: (
modal : 200,
navigation : 100,
footer : 90
);
@mixin z-index($key, $level: 0) {
z-index: map-get($z-index, $key) + $level;
}
@nongio-zz
nongio-zz / spotify_status.sh
Created July 22, 2015 10:38
check current status of spotify
#!/usr/bin/env bash
state=`osascript -e 'tell application "Spotify" to player state as string'`;
if [ $state = "playing" ]; then
current=`osascript -e 'tell application "Spotify"' -e 'set currentArtist to artist of current track as string' -e 'set currentTrack to name of current track as string' -e 'return currentArtist & " - " & currentTrack' -e 'end tell'`;
echo "$current 🔊 ";
else
echo "🙊"
fi
#!/bin/sh
current_branch="$(git rev-parse --abbrev-ref HEAD)" || ""
if [ "$current_branch" != "" ];then
echo "your are not in a git repository!!"
else
mr_url="$(bundle exec git gitlab merge $current_branch master | sed -n 2p)"
echo $mr_url | pbcopy
echo $mr_url
fi
@nongio-zz
nongio-zz / unite_vimrc.vim
Last active August 29, 2015 14:09
unite vim config
" Unite
"unite ctrl-p functionality
call unite#filters#matcher_default#use(['matcher_fuzzy'])
nnoremap <space>b :Unite -quick-match buffer<cr>
nnoremap <space>p :<C-u>Unite file_rec/async<cr>
"unite grep
nnoremap <space>f :<C-u>Unite grep:.<cr>
nnoremap <space>F :<C-u>Unite grep<CR>
"unite history yank
@nongio-zz
nongio-zz / webm.md
Last active August 29, 2015 14:08 — forked from ndarville/webm.md

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.