Skip to content

Instantly share code, notes, and snippets.

View noma4i's full-sized avatar
💭
🦑 Daily Kraken

Alexander Tsirel noma4i

💭
🦑 Daily Kraken
View GitHub Profile
@noma4i
noma4i / .git.alias
Last active December 23, 2015 21:28
Git alias
# Aliases
alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git pull --rebase'
compdef _git gup=git-fetch
alias gp='git push'
@noma4i
noma4i / gist:7382967
Last active December 27, 2015 20:09
Install ruby 2.0 as system.
sudo add-apt-repository ppa:brightbox/ruby-ng-experimental
sudo apt-get update
sudo apt-get install -y ruby2.0 ruby2.0-dev ruby2.0-doc
@noma4i
noma4i / gist:7512637
Created November 17, 2013 12:15
Show forms info in Chrome console
[].forEach.call(document.querySelectorAll('form'), function (input) {
var table = [];
console.group('HTMLForm "' + input.name + '": ' + input.action);
console.log('Element: ', input, '\nName: ' +
input.name + '\nMethod: ' + input.method.toUpperCase() +
'\nAction: ' + input.action || 'null');
['input', 'textarea', 'select'].forEach(function (control) {
[].forEach.call(input.querySelectorAll(control), function (node) {
#!/usr/bin/env ruby
require 'csv'
# This assumes:
# - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV.
#
# https://raw.github.com/hadley/data-baby-names/master/baby-names.csv
csv_fname = "baby-names.csv"
#DROPBOX SYNCING
#==============
# bash_profile
rm -rf .bash_profile
ln -s ~/Dropbox/.bash_profile .bash_profile
# Sublime 2 Preferences
cd ~/Library/Application\ Support/Sublime\ Text\ 2/
ln -s ~/Dropbox/appdata/sublime/Installed\ Packages ./Installed\ Packages
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@noma4i
noma4i / init.rb
Created August 5, 2014 12:42
Proper init.rb for Redmine Project plan loader plugin
require 'redmine'
require_dependency 'string'
require_dependency 'element'
require_dependency 'views_issues_index_bottom_hook'
ActionDispatch::Callbacks.to_prepare do
SettingsHelper.__send__(:include, SettingsHelperPatch)
Mailer.__send__(:include, LoaderMailer)
Issue.__send__(:include, IssuePatch)
@noma4i
noma4i / gist:ba5e58268be74ea4b33c
Created August 10, 2014 06:41
Sublime config
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/Solarized (dark).tmTheme",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Handlebars",
Downloading/unpacking pip
Downloading/unpacking setuptools
Installing collected packages: pip, setuptools
Successfully installed pip setuptools
Cleaning up...
Downloading/unpacking python-keystoneclient
Downloading/unpacking python-swiftclient
Downloading/unpacking iso8601>=0.1.9 (from python-keystoneclient)
Downloading iso8601-0.1.10.tar.gz
Running setup.py (path:c:\users\admini~1\appdata\local\temp\1\pip_build_Administrator\