Skip to content

Instantly share code, notes, and snippets.

View bastienrobert's full-sized avatar
🎲
728

Bastien Robert bastienrobert

🎲
728
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bastienrobert on github.
  • I am bastienrbt (https://keybase.io/bastienrbt) on keybase.
  • I have a public key whose fingerprint is E402 5515 5E15 E474 73D5 9B59 4179 CC7C 3F39 3545

To claim this, I am signing this object:

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}a{text-decoration:none}
require 'uri'
require 'net/http'
require 'json'
url = URI("http://api.stanleystella.com/webrequest/products/get_json")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
@bastienrobert
bastienrobert / alphabet.js
Created June 23, 2017 12:54
Alphabet generator in Javascript
// Function to generate an array w/ alphabet letters
function genCharArray(charA, charZ) {
var a = [], i = charA.charCodeAt(0), j = charZ.charCodeAt(0);
for (; i <= j; ++i) {
a.push(String.fromCharCode(i));
}
return a;
}
// Function to parse URL and get last element
function parseURL(url) {
Verifying that "bastienrobert.id" is my Blockstack ID. https://onename.com/bastienrobert
@bastienrobert
bastienrobert / URL_helper.rb
Created September 6, 2017 22:53
URL helper for middleman : translate the same page in another language
module URLHelper
def link_translate(lang)
return link_to data.languages.send(lang.to_s),
if lang === I18n.default_locale
config[:host] + '/' +
path_translate(lang) +
t("paths.#{current_page.data.title}", locale: lang)
else
config[:host] + '/' +
@bastienrobert
bastienrobert / README.md
Last active November 6, 2017 08:21
README markdown template
@bastienrobert
bastienrobert / gulpfile.js
Created October 1, 2017 11:28
Gulpfile using SASS and SASS-GLOB (from /scss to /css)
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
gulp.task('scss', function () {
return gulp.src('./scss/app.scss')
.pipe(sassGlob())
.pipe(sass().on('error', sass.logError))
@bastienrobert
bastienrobert / parallax.js
Created October 10, 2017 12:23
Parallax library
/*
* Add a dataset to your target like this :
* data-parallax='1'
*
* Parallax strenght can be define with the number
*
*/
var els = []
@bastienrobert
bastienrobert / TECHS.md
Last active January 30, 2018 23:35
Technologies I already used

Technologies

Here are the techs I already used.

Legend

❤️ Mastered

... Doesn't mastered, but advanced utilisation

😕 Already used but doesn't mastered