Skip to content

Instantly share code, notes, and snippets.

View clm-a's full-sized avatar

Clément Alexandre clm-a

View GitHub Profile
@clm-a
clm-a / manjaro.sh
Created March 1, 2024 08:45
Manjaro Install Party
# 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
@clm-a
clm-a / Java.md
Last active August 22, 2019 08:10
Java & Design patterns

Java

class Main{
  public static void main(String[] args){
    System.out.println("Hello world");
  }
}
@clm-a
clm-a / docker-compose.yml
Created January 7, 2018 15:13
Docker compose file for use of Rails 5.1 + NodeJS 8.x, Yarn & Webpack(er) ready
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
@clm-a
clm-a / hash_checkboxes_rails.rb
Created March 22, 2012 11:48
Checkboxes for rendering an Hash in Rails
# file mood.rb
Mood = Struc.new(:happy)
# file user.rb
class User
serialize mood, Mood
def mood=(attr={})
@clm-a
clm-a / html et css.md
Last active December 14, 2016 11:23
Notes de cours

Sommaire

  1. Intro html
  2. Les balises
  3. Les attributs
  4. Quelques balises html5
  5. Zoom sur les formulaires
  6. CSS
  7. Les sélecteurs
  8. Modifier l'aspect
@clm-a
clm-a / cheatsheet.md
Last active October 17, 2016 14:05

Algo cheatsheet

##1. Structure du fichier source

####En C : script.c

#include <stdio.h>
void main(){
  // commentaire
  // Code ici !
  printf("Hello world");
@clm-a
clm-a / git_commands.sh
Created October 17, 2012 17:08
Git commands
git log --graph --oneline --all
git rebase --onto topic1~2 topic2~1 topic2
@clm-a
clm-a / pitoval_import.rake
Created July 18, 2012 17:23 — forked from codatory/pitoval_import.rake
Pivotal Tracker Importer for Redmine
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
@clm-a
clm-a / getting-started.sh
Created May 10, 2012 14:04
Getting started w/ devise, bootstrap, simple form...
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
@clm-a
clm-a / amperstand.rb
Created April 20, 2012 12:05
&method
# 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))