Skip to content

Instantly share code, notes, and snippets.

View karlcow's full-sized avatar
⛩️
Working from … anywhere

Karl Dubost karlcow

⛩️
Working from … anywhere
View GitHub Profile
@karlcow
karlcow / recover-deleted-branch.sh
Created May 13, 2024 12:11 — forked from umayr/recover-deleted-branch.sh
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@karlcow
karlcow / fimstrip.py
Created June 20, 2018 00:59 — forked from nvbn/fimstrip.py
fimstrip.py
from collections import Counter
import requests
from pycaption.srt import SRTReader
import lxml.html
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
lang = 'en-US'
path = ''
@karlcow
karlcow / index.py
Created December 18, 2013 11:11 — forked from davidbgk/index.py
#!/usr/bin/python3
import os
import cgi
import cgitb
cgitb.enable()
import subprocess
import urllib.request
form = cgi.FieldStorage()
source = form.getvalue('source', None)
@karlcow
karlcow / mozua.sh
Last active December 19, 2015 07:19 — forked from lmandel/uaOverride.sh
Bash script to manage the list of UA override on Firefox OS devices. It requires to have adb installed on your computer.
#!/bin/sh
# Script to add a UA override to B2G
# Based on Dave Hyland's script https://gist.github.com/2656232
# Based on Lawrence Mandel's script https://gist.github.com/lmandel/4291503
# Put at https://gist.github.com/karlcow/5917783
# Options:
# remove - removes the override
# Usage:
# ./uaOverride.sh add example.com
# ./uaOverride.sh remove example.com

General context

  • A static website using a generator (like Jekyll)
  • Comments are in a folder, one comment = one JSON file (attached to article based on path + filename)
  • website is versionned using git, repository hosted by github (cool for pull-requests)

Posting a new comment

OK here we need some dynamism ;)

@karlcow
karlcow / thoughts.mdown
Created October 7, 2012 11:30 — forked from davidbgk/thoughts.mdown
About interacting with David Thoughts

Online Discussions And Interactions

License

This document is under CC0 aka equivalent of public domain. People may fork it at will so it will travel through space and time without a precise ownership and might blossom in thousand of branches.

Contributing to this document

You may fork, rewrite a poem, take a stroll and make a photo album with it, add a comment, it doesn't matter. At least a few branches or outcomes of this document might create something owned by our collective mind more than individual. Maybe it will die, it doesn't matter. It really depends on the desire of the people involved to make it alive.