class Main{
public static void main(String[] args){
System.out.println("Hello world");
}
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UTILITIES | |
sudo pacman -Syu | |
sudo pacman -Sy --needed git base-devel inotify-tools ncurses glu mesa wxgtk3 libpng vim | |
git clone https://aur.archlinux.org/yay-git.git yay | |
cd yay | |
makepkg -si | |
cd .. | |
rm -rf yay | |
# SHELL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
rails: | |
image: 'clmntlxndr/rails51_webpacker' | |
links: | |
- postgres:postgres | |
volumes: | |
- $HOME/.docker_data/rails51/bundle:/usr/local/bundle | |
- $PWD:$PWD | |
working_dir: $PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file mood.rb | |
Mood = Struc.new(:happy) | |
# file user.rb | |
class User | |
serialize mood, Mood | |
def mood=(attr={}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --graph --oneline --all | |
git rebase --onto topic1~2 topic2~1 topic2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'ruport' | |
rescue LoadError => err | |
warn "Couldn't load ruport gem: #{err}" | |
end | |
# ugly Ruport monkey patching to avoid the call of FasterCSV | |
module Ruport::Data | |
class Table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails new | |
# Gemfile | |
gem simple_form | |
gem twitter-bootstrap-rails gem | |
rails g simple_form:install --bootstrap | |
# have a look : lib/templates/erb/scaffold/_form.html.erb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From : http://andrewjgrimm.wordpress.com/2011/10/03/in-ruby-method-passes-you/ | |
["1", "2", "3"].map(&method(:Integer)) | |
filenames = ["a.txt", "b.txt", "c.txt"] | |
texts = filenames.map(&File.method(:read)) |
NewerOlder