Skip to content

Instantly share code, notes, and snippets.

@Awea
Awea / asset_list.bash
Created March 23, 2018 07:14
Snippet: output list of assets to an assets.json file for batch loading
#!/bin/bash
# Script used in combinaison with https://github.com/ianmcgregor/assets-loader
# Assign find result to an array see:
# https://stackoverflow.com/questions/23356779/how-can-i-store-find-command-result-as-arrays-in-bash/23357277#23357277
assets=()
while IFS= read -r -d $'\0'; do
# Remove static/ from asset path
assets+=("${REPLY//static\//}")
@Awea
Awea / docker-compose.yml
Created March 21, 2018 12:28
Docker compose: PHP (5.4), composer, Apache, MySQL and phpMyAdmin
version: '3'
services:
api:
image: alterway/php:5.4-apache
environment:
PHP_php5enmod: 'mysqli'
HTTPD_a2enmod: 'rewrite headers'
volumes:
# ./api contains my PHP application
- "./api:/var/www/html"

Keybase proof

I hereby claim:

  • I am awea on github.
  • I am awea (https://keybase.io/awea) on keybase.
  • I have a public key ASCQZtznj2U4XEW3QGN7QTtWHGViZP0Y_G3GbyILqUFIvgo

To claim this, I am signing this object:

@Awea
Awea / Gemfile
Created April 10, 2013 20:31
Nokogiri wtf
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'thin'
gem 'mysql2'
gem 'slim'
gem 'foreman'
# Model easing
gem 'active_attr'
@Awea
Awea / simple_controller.rb
Created March 29, 2013 10:32
Simple proxy in rails
class SimpleController < ApplicationController
def index
url = 'http://www.lemonde.fr/'
result = open(url)
render :text => result.read
end
end
@Awea
Awea / Gemfile
Last active December 14, 2015 07:39
Markdown to Html with code highlight
gem 'redcarpet'
gem 'pygmentize'
@Awea
Awea / lol1.md
Last active December 10, 2015 01:09
Instagram Headquarters
@Awea
Awea / robot.js
Created December 11, 2012 02:21
Zolmeister
var robots = new Array();
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.start = function( ev ){
@Awea
Awea / robot.js
Created December 11, 2012 01:29
AweaOwnYou
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);