Skip to content

Instantly share code, notes, and snippets.

Thibaut Assus tibastral

Block or report user

Report or block tibastral

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add2andproduct.elm
add2AndProduct1 : List Int -> Int
add2AndProduct1 list =
List.product (List.map (\e -> e + 2) list)
add2AndProduct2 : List Int -> Int
add2AndProduct2 list =
list
|> List.map (\e -> e + 2)
|> List.product
View elmruntimeexception.js
(function() {
'use strict';
function F2(fun)
{
function wrapper(a) { return function(b) { return fun(a,b); }; }
wrapper.arity = 2;
wrapper.func = fun;
return wrapper;
View image_uploader.js
export default function y (elmApp) {
var globalReader = function () {
var reader = new FileReader()
reader.onload = (function (event) {
elmApp.ports.imageRead.send(event.target.result)
})
return reader
}()
View places_controller.rb
# frozen_string_literal: true
class PlacesController < ApplicationController
def index
render json: RIP.get(
:gplaces,
'autocomplete/json',
input: params[:q]
)
View marvels.elm
moveBottomRight ({ x, y } as coords) =
{ coords | x = x + 1, y = y + 1 }
View Test.elm
all : Test
all =
describe "A Test Suite"
[ test "Collision" <|
\() ->
Expect.false "Collision didn't work" (Character.collision initialKoala initialFlag)
, test "CollisionPosition" <|
\() ->
Expect.false "Initial state of game is loosing" (Game.isLoosing Game.initial)
, test "CollisionPosition" <|
View game.elm
step : Game -> Position -> Game
step game arrows =
game
|> handleWinning
|> handleLoosing
|> stepCharacter arrows
|> stepEnemies
isWinning : Game -> Bool
View logo_uploader.rb
class LogoUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
def extension_white_list
%w(jpg jpeg gif png)
end
process :convert => 'png'
process :resize_to_limit => [1024, 1024]
@tibastral
tibastral / .env
Last active Mar 17, 2016 — forked from dblandin/.env
Managing RubyMotion environment variables
View .env
TESTFLIGHT_APP_TOKEN=90210
TESTFLIGHT_TEAM_TOKEN=90210
TESTFLIGHT_API_TOKEN=90210
BUGSENSE_API_KEY=90210
BUGSENSE_API_TOKEN=90210
DEVELOPMENT_CERTIFICATE_NAME="iPhone Developer: yourName"
DEVELOPMENT_PROVISIONING_PROFILE_PATH="/path/to/development.mobileprovision"
View cours
# Array + Hashes
a = [ 1, 'cat', 3.14 ] # array with three elements
puts "The first element is #{a[0]}"
a[2] = nil
puts "The array is now #{a.inspect}"
# -> The first element is 1
You can’t perform that action at this time.