Skip to content

Instantly share code, notes, and snippets.

🤔
I'm sorry, Dave, I'm afraid I can't do that

Laurent Vallar Val

🤔
I'm sorry, Dave, I'm afraid I can't do that
Block or report user

Report or block Val

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 send_sms.sh
#!/bin/sh
# -*- mode:shell-script;sh-tab-width:2;indent-tabs-mode:nil;coding:utf-8 -*-
# vim: ft=shell syn=shell fileencoding=utf-8 sw=2 ts=2 ai eol et si
#
# send_sms.sh: Free Mobile (french provider) SMS service send message script
# (c) 2014 Laurent Vallar <val@zbla.net>, WTFPL license v2 see below.
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
View next_train_for.rb
#!/usr/bin/env ruby
# -*- mode:ruby;tab-width:2;indent-tabs-mode:nil;coding:utf-8 -*-
# vim: ft=ruby syn=ruby fileencoding=utf-8 sw=2 ts=2 ai eol et si
#
# next_train_for.rb: french trains station in motion service client script
# (c) 2010-2014 Laurent Vallar <val@zbla.net>, WTFPL license v2 see below.
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
@Val
Val / rails_admin_sample_template.rb
Created Oct 1, 2012
Rails template to test list's filters on has_and_belongs_to_many associations
View rails_admin_sample_template.rb
# -*- mode:ruby;indent-tabs-mode:nil;coding:utf-8 -*-
#
# rails_admin test template: (c) 2012 Laurent Vallar <val@zbla.net>
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#
@Val
Val / crystal_json_vs_yaml_serialization.cr
Created Sep 12, 2016
Crystal JSON vs YAML serialization
View crystal_json_vs_yaml_serialization.cr
require "json"
require "yaml"
require "secure_random"
class SerializableKlass
YAML.mapping({
bool: { type: Bool, nilable: true},
float: { type: Float64, nilable: true},
int: { type: Int32, nilable: true},
str: { type: String, nilable: true}
View keybase.md

Keybase proof

I hereby claim:

  • I am Val on github.
  • I am val_ (https://keybase.io/val_) on keybase.
  • I have a public key whose fingerprint is 50ED 0818 014B 1FB1 1C95 0C0C 0011 DC24 B796 EB52

To claim this, I am signing this object:

@Val
Val / download_latest_crystal_tagged_deb.rb
Last active Jun 12, 2018
Ruby script to download latest Crystal tagged Debian package
View download_latest_crystal_tagged_deb.rb
#!/usr/bin/env ruby
# vim: ft=ruby syn=ruby fileencoding=utf-8 sw=2 ts=2 ai eol et si
#
# download_latest_crystal_tagged_deb.rb: this script looks up the latest
# successfull tagged build of crystal on Circle CI, extracts the build number
# of `dist_artifacts` job and retrieves it's Debian artifacts, depending of
# ARCH environment variable (default: 'amd64')
#
# (c) 2018 Laurent Vallar <val@zbla.net>, WTFPL license v2 see below.
#
@Val
Val / build_rest-like_api.rb
Created Jan 19, 2016
Token protected REST-like API using Grape, Swagger on top of Rails. Based on http://www.toptal.com/ruby/grape-gem-tutorial-how-to-build-a-rest-like-api-in-ruby/
View build_rest-like_api.rb
# -*- mode:ruby;tab-width:2;indent-tabs-mode:nil;coding:utf-8 -*-
# vim: ft=ruby syn=ruby fileencoding=utf-8 sw=2 ts=2 ai eol et si
#
# build_rest-like_api.rb: sample REST-like API server
# (c) 2016 Laurent Vallar <val@zbla.net>, WTFPL license v2 see below.
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
You can’t perform that action at this time.