Skip to content

Instantly share code, notes, and snippets.

Jérôme Foray Meroje

Block or report user

Report or block Meroje

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
@Meroje
Meroje / getec2lifecycle.sh
Last active May 21, 2019 — forked from urjitbhatia/getec2lifecycle.sh
Check if an ec2 instance is spot or normal lifecycle
View getec2lifecycle.sh
#!/usr/bin/env bash
aws ec2 describe-spot-instance-requests \
--filters Name=instance-id,Values="$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)" \
--region "$(wget -q -O - http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.region')" | \
jq -r '.SpotInstanceRequests | if length > 0 then "spot" else "normal" end'
View ktype.json
{
"header": {
"Name": "KType",
"Variant": "standard",
"Layout": "NoAnimations",
"Base": "Base",
"Version": "0.2",
"Author": "Meroje",
"KLL": "0.5c",
"Date": "2019-01-14",
@Meroje
Meroje / unicode.txt
Created Jul 24, 2012
Some handpicked Unicode Art
View unicode.txt
1.)
║▌║││ █ ▌│║║
2.)
▄▀▄▀▄▀▄▀
3.)
View sds011.ino
// SDS011 dust sensor example
// for use with SoftSerial
// -----------------------------
#include <SoftwareSerial.h>
uint8_t wakequery[] = {
0x01
};
uint8_t readquery[] = {
View gist:b08a4e358517ba7a26de533e494a92d4
https://github.com/eevee/camel/blob/1f9132ce43f6933bd3e91681404aab817876b3e1/docs/yamlref.rst
View scw_facts.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: scw_facts
'''
EXAMPLES = '''
# To see the list of all the facts use command below:
View setup-tinc-peer.sh
#!/usr/bin/env bash
# Based on https://github.com/edanaher/scaleway-utils/blob/45d89a534d0ff9427a120e509d215e195fe083dc/tinc/add-tinc.sh
export PS4="\[\033[32;1m++\[\033[0m "
set -ex
HOST=$1
TINCIP=$2
TINCNAME=${3:-$1}
View webpack.config.js
/*! webpack.config.js | Build JS, CSS,.. client assets and StyleGuide */
'use strict';
var webpack = require('webpack');
var ExtractTextWP = require('extract-text-webpack-plugin');
var HtmlWP = require('html-webpack-plugin');
var path = require('path');
var moment = require('moment');
View settings.php
<?php
class DBconfiguratorObject implements ArrayAccess, Serializable {
protected $config = array();
protected $table = null;
private static $_instance = null;
public static function instance($tableName = 'config'){
if(self::$_instance === null){
self::$_instance = new self($tableName);
@Meroje
Meroje / comment.php
Created Dec 4, 2013
TimeDiff For Humans
View comment.php
<?php
use Carbon\Carbon;
class Comment extends Eloquent {
protected $guarded = array();
protected $softDelete = true;
public static $rules = array();
You can’t perform that action at this time.