Skip to content

Instantly share code, notes, and snippets.

View carlesso's full-sized avatar

Enrico Carlesso carlesso

View GitHub Profile
from math import cos, pi, sin
import cv2
import numpy
from random import choice, randint
from PIL import Image
import click
WHITE = (255, 255, 255)
RED = (0, 0, 255)
from PIL import Image
from random import choice
ITERATIONS = 1_000_000
SIZE = 1000
OFFSET = 50
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
# :nocov:
if defined?(Rails)
module MyGem
module Rails
class Engine < ::Rails::Engine
end
end
end
end
# :nocov:
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'start' ]
2 info using npm@2.12.1
3 info using node@v0.12.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart learning-react@1.0.0
6 info start learning-react@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info learning-react@1.0.0 Failed to exec start script
9 verbose stack Error: learning-react@1.0.0 start: `node --harmony server`
class WelcomeController < ApplicationController
def index
@xhr = request.xhr?
render :index, change: 'variable'
end
end
require 'rubygems'
require 'bundler/setup'
require 'faye/websocket'
require 'eventmachine'
require 'json'
require 'pry'
EM.run {
url = ARGV[0]
headers = {'Origin' => 'http://faye.jcoglan.com'}
@carlesso
carlesso / Twitter Languages - 2015-06-25
Created June 24, 2015 22:26
Twitter Languages - 2015-06-25
[
{
"code": "fr",
"name": "French",
"status": "production"
},
{
"code": "en",
"name": "English",
"status": "production"
if object.asin.present?
"http://www.amazon.it/gp/product/#{object.asin}/ref=as_li_qf_br_asin_il_tl?ie=UTF8&camp=3370&creative=23322&creativeASIN=#{object.asin}&linkCode=as2&tag=swdaniele-21"
else
"http://www.amazon.it/s/ref=nb_sb_noss_1?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Ddvd&field-keywords=#{CGI::escape title}&tag=swdaniele-21"
end
%w{git bash-completion htop multitail sudo vim wget autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev}.each do |pkg|
puts "HERE: #{pkg}"
apt_package pkg
end
execute 'apt-get update' do
action :nothing
end.run_action(:run)
include_recipe 'basic::users'
%w{git bash-completion htop multitail sudo vim wget autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev}.each do |pkg|
package pkg do
action :install
end
end
execute 'apt-get update' do
action :nothing
end.run_action(:run)