I hereby claim:
- I am mledoze on github.
- I am mledoze (https://keybase.io/mledoze) on keybase.
- I have a public key ASAXSv9KIVEcT_sqn-YwKid8qV26N6racsqFX_KXytmLago
To claim this, I am signing this object:
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# Add `~/bin` to the `$PATH` | |
export PATH="$PATH:$HOME/bin" | |
export TERM='xterm-256color' |
# ls aliases | |
colorflag="--color" | |
alias ls="ls ${colorflag}" | |
alias l="ls -lhF ${colorflag}" | |
alias ll="ls -lhF ${colorflag}" | |
# List all files colorized in long format, including dot files | |
alias la="ls -laF ${colorflag}" | |
# List only directories |
set ai " set auto-indenting on for programming | |
set showmatch " automatically show matching brackets. works like it does in bbedit. | |
set vb " turn on the "visual bell" - which is much quieter than the "audio blink" | |
set ruler " show the cursor position all the time | |
set laststatus=2 " make the last line where the status is two lines deep so you can see status always | |
set backspace=indent,eol,start " make that backspace key work the way it should | |
set nocompatible " vi compatible is LAME | |
set background=dark " Use colours that work well on a dark background (Console is usually black) | |
set showmode " show the current mode | |
set clipboard=unnamed " set clipboard to unnamed to access the system clipboard under windows |
BoldAsFont=-1 | |
Term=xterm-256color | |
Transparency=off | |
OpaqueWhenFocused=no | |
CursorType=block | |
CursorBlinks=no | |
FontSmoothing=full | |
Font=Consolas | |
RightClickAction=paste |
[user] | |
name = Mohammed Le Doze | |
email = [email protected] | |
[alias] | |
lga = log --decorate --stat --graph --pretty=format:\"%d %Cgreen%h%Creset (%ar - %Cred%an%Creset), %s%n\" | |
lg = log --decorate --graph --format='%Cgreen%h%Creset %ad %C(cyan)%an%Creset - %s%C(red)%d%Creset' --date=short | |
l = log --graph --pretty=format:'%Cred%h%Creset - %C(bold blue)%an%Creset -%C(red)%d%Creset %s %Cgreen(%cr)' --abbrev-commit --all | |
stat = shortlog -sne | |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: consul | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Consul service discovery framework | |
# Description: Healthchecks local services and registers | |
# them in a central consul database. |
from lxml import html #pip install lxml | |
import requests, time, os.path, json | |
save_to = 'flags_new' #folder where you want to save. NO / ! | |
temp_data, data = {}, {} | |
def stripper(c_name): | |
print('Doing: ', c_name) | |
page = requests.get('https://en.wikipedia.org/wiki/File:Flag_of_' + c_name + '.svg') #loads the webpage | |
tree = html.fromstring(page.text) #html to xpath tree |
This gist is very old. I don't even know if it still works. Check the comments below to find more robust solutions, like youtube-dl
for example, see this comment.
Go to http://www.arte.tv/ and select any videos, for example http://www.arte.tv/guide/fr/046618-011/silex-and-the-city
In the source code extract the src
parameter of the iframe player:
<?php | |
/* | |
* http://codegolf.com/home-on-the-range | |
* | |
* The Problem | |
* It's difficult to spot what's missing in a long list of numbers if they are just listed one after the other. | |
* You can make it easier by organising the numbers into ranges, and that's exactly what you're going to do here. | |
* | |
* Your program will receive a set of space-separated numbers on stdin, and it will be expected to print a set of | |
* ranges on stdout formatted according to the following rules : |