This file contains hidden or 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
--- | |
parser: babel-eslint | |
parserOptions: | |
ecmaVersion: 6 | |
sourceType: "module" | |
ecmaFeatures: | |
jsx: true | |
plugins: | |
- react | |
env: |
This file contains hidden or 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 | |
# based on: https://gist.github.com/linhmtran168/2286aeafe747e78f53bf | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\.jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
# Escape code | |
esc=`echo -en "\033"` |
This file contains hidden or 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
# /etc/systemd/system/swapon.service | |
# from: https://www.matthowlett.com/notes/2015/08/01/coreos-swap.html | |
# sudo systemctl enable swapon.service | |
# restart | |
# or | |
# sudo systemctl start swapon | |
[Unit] | |
Description=Turn on swap | |
[Service] |
This file contains hidden or 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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
var deepEqual = require('deep-equal'); | |
function log(data) { | |
data = data || ''; | |
document.getElementById('result').innerHTML += data + '<br>'; | |
} |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
import signal | |
import sys | |
import uuid | |
import zmq | |
from PyQt5.QtWidgets import QApplication, QWidget |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# DEALER to ROUTER (N->1) | |
# this can be used for many client to use a central worker | |
import pprint | |
import random | |
import time | |
import uuid |
This file contains hidden or 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 | |
# Inspired on: | |
# http://www.yourownlinux.com/2014/10/how-to-install-linux-kernel-3-17-stable-in-linux.html | |
# http://www.yourownlinux.com/2015/06/how-to-install-linux-kernel-4-1-0-in-linux.html | |
set -euo pipefail | |
IFS=$'\n\t' | |
# NOTE: you need to set this variable to the desired kernel you want | |
VERSION="v4.1-unstable" |
This file contains hidden or 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
#include <Python.h> | |
#include <iostream> | |
#include <cstdlib> | |
// compile with: | |
// g++ -o env env.cpp -O2 -Wall -Wno-long-long -pedantic -pthread $(pkg-config --cflags --libs python2) | |
void show_paths() { | |
std::string env_path; |
This file contains hidden or 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 | |
###################################################################### | |
# repo-versions.sh | |
# Copyright (C) 2014 LEAP | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or 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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
distro(){ | |
# for ubuntu/mint: | |
name=`lsb_release -a 2>&1 | grep Codename | cut -f2` | |
# for debian: | |
[[ -z $name ]] && name=`grep -oP "VERSION=.*\(\K\w+" /etc/os-release` |