Skip to content

Instantly share code, notes, and snippets.

View Asone's full-sized avatar
🦀
npub10fd0ncqmzd6q3e7t9kzlh82asw2jj7kpn7hjvcrfhq4uyzc4dpvsxtvn3n

Asone

🦀
npub10fd0ncqmzd6q3e7t9kzlh82asw2jj7kpn7hjvcrfhq4uyzc4dpvsxtvn3n
View GitHub Profile
@Asone
Asone / gist:509b3bb17130c20fd266
Created July 30, 2014 09:21
French Gov agenda scrap test
[{"nom":"Laurent FABIUS","titre":"Ministre des Affaires étrangères et du Développement international","agenda":[{"date":"28 juillet","events":[{"time":"8h 28/7","content":" Bernard Cazeneuve : petit déjeuner de travail"},{"time":"11h 28/7","content":" Denis Kessler, président-directeur général de Scor (Paris)"},{"time":"17h 28/7","content":" Augustin de Romanet, président-directeur général d’Aéroports de Paris"}]},{"date":"29 juillet","events":[{"time":"8h30 29/7","content":" Entretien avec le président de la République"},{"time":"17h 29/7","content":" Entretien avec le Premier ministre"}]},{"date":"30 juillet","events":[{"time":"10h 30/7","content":" Conseil des ministres"},{"time":"11h30 30/7","content":" Michel Sapin"}]},{"date":"1 août","events":[{"time":"11h 1/8","content":"11h - Séminaire gouvernemental (Elysée)"}]}]},{"nom":"Ségolène ROYAL","titre":"Ministre de l'Écologie, du Développement durable et de l'Énergie","agenda":[]},{"nom":"Benoît HAMON","titre":"Ministre de l'Éducation nationale, de l'Ensei
@Asone
Asone / gist:bb787fff94e68ec0fc85
Created July 31, 2014 14:45
Draft for scrapping french gov agenda
#!/usr/bin/env ruby
# encoding: utf-8
require 'nokogiri'
require 'open-uri'
require 'json'
require 'yaml'
require 'date'
require_relative('months_conversion.rb')
# URL de présentation de l'ensemble du gouvernement
@Asone
Asone / macOS_install_gem
Created September 5, 2014 11:07
install ruby gems on mac OS X avoiding unknown flags error
sudo -s ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install gem-name
@Asone
Asone / gist:fad89a640574f2380d53
Created September 29, 2014 12:28
draft of proto for further use in ACL roussestagram feature
def initialize(*args)
@acl = YAML.load_file('acl.yaml')
end
def acl(action)
if m.user.authed? && (@acl.find_index{ |l| l[action] })
end
end
var inventory = b.getInventory(function(e,d){
for(i=0;i<d.inventory_items.length;i++){
console.log(d.inventory_items[i].inventory_item_data.item) }
});
@Asone
Asone / instance.ts
Last active February 1, 2018 10:32
Create an instance of smart-contract to interact with when contract address is not already specified
// this is useful when you have to interact with contract instanciated on-the-go from another contract and can't use the deployed() method of truffle-contract
/**
*
* @ABIJSON : a JSON object representing the ABI file ( mostly generated with a solidity compiler or a deployment framework ( embark / truffle )
* @nodeEntryPoint : node of the ETH chain to interact with
* @scDeployedAddress : Address of the contract to interact with
* @myMethod : Method of the smart contrac to call
* @arg1,arg2,argN : some arguments for the method.
* @signatureAddress : address originating the transaction
* @maxGas : gas that will be provided for the transaction. If can't be determined in advance, should be quite large, moreover if you plan to call a method that itself will deploy another contract
{
scrutins{
dateScrutin
titre
demandeur{
referenceLegislative
}
numero
sort{
@Asone
Asone / derouleur.d.ts
Created September 18, 2018 23:16
Extraction d'interfaces typescript sur la base d'un échantillon issu du dérouleur de l'assemblée nationale
export interface Welcome {
racine: Racine;
}
export interface Racine {
jaune: Jaune;
contenu: Contenu;
}
export interface Contenu {
Account {
address: '<my0xedAddress>',
privateKey:
'<myPrivateKey>',
accounts:
TransactionSigner {
utils:
{ randomHex: [Function: randomHex],
jsonInterfaceMethodToString: [Function: jsonInterfaceMethodToString],
@Asone
Asone / .tmux.conf
Created December 20, 2019 11:04
Tmux config
# ==========================
# === General settings ===
# ==========================
set -g default-terminal "screen-256color"
set -g history-limit 20000
set -g buffer-limit 20
set -sg escape-time 0
set -g display-time 1500
set -g remain-on-exit off