This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### | |
# Label definitions | |
### | |
declare -A LABELS | |
# Inactive | |
LABELS["invalid"]="D2DAE1" | |
LABELS["wontfix"]="D2DAE1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RATE=5 | |
CEIL=1 | |
echo -e "Clean rules" | |
/sbin/tc qdisc del dev eth0 root | |
echo -e "Turn on queueing discipline" | |
/sbin/tc qdisc add dev eth0 root handle 1: htb default 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Hoa\Option; | |
interface Option | |
{ | |
public function isSome() : bool; | |
public function isNone() : bool; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit andre-staltz | |
// from : https://egghead.io/instructors/andre-staltz | |
const data = [1,2,3,4,5]; | |
var foo = Rx.Observable.of(...data); | |
// foo.map | |
// foo.filter | |
// foo.merge | |
// foo.combineLatest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "xterm" | |
set -g default-terminal "screen-256color" | |
set-option -g default-shell /usr/bin/zsh | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
set -s escape-time 1 | |
set -g base-index 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace My\Vendor; | |
/** | |
* Class SemverObject | |
*/ | |
final class SemverObject | |
{ | |
protected $major; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Provide { | |
fn credentials(&self) -> bool; | |
} | |
struct StaticProvider { | |
foo: String | |
} | |
impl StaticProvider { | |
pub fn new(value: String) -> StaticProvider { | |
return StaticProvider { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash - | |
#title :cloudformation | |
#description :handle cloudformation command | |
#author :© 2016 Continuous SA - Tomasina Pierre | |
#date :20170202 | |
#version :0.1 | |
#usage :bash cloudformation [OPTIONS] action | |
#notes :Requirement : aws-cli | |
#============================================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"profile" : "{{env `AWS_PROFILE`}}", | |
"region" : "{{env `AWS_REGION`}}", | |
"build_vpc" : "{{env `VPC_ID`}}", | |
"build_subnet" : "{{env `SUBNET_ID`}}", | |
"build_instance_type" : "{{env `AWS_INSTANCE_TYPE`}}", | |
"source_ami" : "{{env `AWS_SOURCE_AMI`}}", | |
"distribution" : "Amazon Linux", | |
"distribution_user" : "{{env `AWS_AMI_USER`}}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright (c) 2018, Pierre Tomasina | |
INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
EC2_REGION=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | rev | cut -c 2- | rev` | |
SSH_RUNNING=`netstat -nap | grep ESTABLISHED | grep sshd` | |
uptimeMore60min=`cat /proc/uptime | awk '{print $1/60" > 60"}' | bc -l` | |
if [ 0 -eq $uptimeMore60min ];then |