Skip to content

Instantly share code, notes, and snippets.

View harobed's full-sized avatar
💭
CTO at Spacefill

Stéphane Klein harobed

💭
CTO at Spacefill
View GitHub Profile
#!/usr/bin/env bash
# curl ... | bash
set -e
# make in case they aren't already there
mkdir -p "/usr/local/lib"
mkdir -p "/usr/local/bin"
# Check for Homebrew,
@harobed
harobed / ASS.md
Created November 30, 2018 20:20 — forked from klaaspieter/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@harobed
harobed / verbose.sh
Created August 4, 2018 21:47
Print a trace of commands in bash without variable expansion
#!/bin/bash
set -T
trap 'echo "> $BASH_COMMAND"' DEBUG
i=1234
echo "$i"
(echo $i)
@harobed
harobed / README.md
Created December 3, 2017 12:49
Merge git `project/repos-b` in `project/repos-a` in `repos-b` subdirectory:

Merge project/repos-b in project/repos-a in repos-b subdirectory:

$ git clone git@example.com:project/repos-a.git
$ cd repos-a
$ git remote add -f repos-a git@example.com:project/repos-b.git
$ git merge -s ours --allow-unrelated-histories --no-commit repos-b/master
$ git read-tree --prefix=repos-b/ -u repos-b/master
$ git commit -m "Merge repos-b as our subdirectory"
$ git pull --allow-unrelated-histories -s subtree repos-b master
@harobed
harobed / README.md
Last active November 30, 2017 09:20
OSX Installation

Installation:

Home brew packages:

$ brew install \
 coreutils \
#include <stdio.h>
int main ()
{
int chiffres[3];
char *pn = 0;
x = 0;
pn = chiffres;
@harobed
harobed / gist:0e3a2b6420f2ea23c33ad03d9d6e09b3
Last active July 18, 2016 09:43
tu veux que je te donne
#include <stdio.h>
void ft_is_negative(int n)
{
if (n < 0)
{
putchar('N');
}
else
{
@harobed
harobed / gist:5845674
Created June 23, 2013 16:50
python assert equal with ellipsis
import unittest
import re
class BaseTest(unittest.TestCase):
def assertEqualEllipsis(self, first, second, ellipsis_marker='...', msg=None):
"""
Example :
>>> self.assertEqualEllipsis('foo123bar', 'foo...bar')
@harobed
harobed / gist:5777518
Last active December 18, 2015 11:39 — forked from athoune/gist:5777474
#!/usr/bin/env python
import sys
# Lamson is an application, but also the best way to read email without
# struggling with "battery include" libraries.
from lamson.encoding import from_string
from pyelasticsearch import ElasticSearch
from pyelasticsearch.exceptions import ElasticHttpNotFoundError
@harobed
harobed / gist:3905215
Created October 17, 2012 12:09
Append client scripts in casperjs
var casper = casperjs.create({
verbose: true,
logLevel: "error",
clientScripts: [
'jquery.js',
'jquery.simulate.js',
'jquery.simulate.ext.js',
'jquery.simulate.drag-n-drop.js',
'jquery.simulate.key-combo.js',
'jquery.simulate.key-sequence.js'