Skip to content

Instantly share code, notes, and snippets.

View Siedlerchr's full-sized avatar

Christoph Siedlerchr

View GitHub Profile
@oscarryz
oscarryz / gist:4121184
Created November 20, 2012 21:14
Brief history of Objective-C square brackets

Brief history of the "square brackets" as I remember it.

One of the most challenging aspects of the language are the square brackets because they look like arrays, as you just mention.

As I remember the language was inspired in smalltalk, but using C to gain speed.

The idea behind smalltalk was to send message as we do with real life objects. For instance if I ask you your age I would say something like this in natural language:

@dafi
dafi / gource2mp4.sh
Created May 25, 2013 08:41
Gource best configuration for a big repository The configuration shown here generates a good video to upload on youtube
gource -1920x1080 --title "MyTitle" --hide filenames --stop-at-end --file-idle-time 0 -o temporary.ppm --seconds-per-day .00050 ~/prj/svn/myproject
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i temporary.ppm -vcodec libx264 -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 -preset slow finalVideo.mp4
@mledoze
mledoze / download-arte.tv-videos.md
Last active February 16, 2021 20:43
This tutorial explains how to download videos from http://www.arte.tv/

Edit 2021/02/16: warning

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.

1

Go to http://www.arte.tv/ and select any videos, for example http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

2

In the source code extract the src parameter of the iframe player:

http://www.arte.tv/player/v2/index.php?json_url=http%3A%2F%2Farte.tv%2Fpapi%2Ftvguide%2Fvideos%2Fstream%2Fplayer%2FF%2F046618-011_PLUS7-F%2FALL%2FALL.json&lang=fr_FR&config=arte_tvguide&rendering_place=http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

@zr-tex8r
zr-tex8r / README.md
Last active November 17, 2023 00:19
LaTeX: To make blinking text (if you dare)

bxblink Package

LaTeX: To make blinking text (if you dare)

System requirement

  • TeX format: LaTeX.
  • TeX engine: Anything.
  • DVI driver: dvips / dvipdfmx / pdfTeX / XeTeX.
@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active March 12, 2024 07:34
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

public class SelectionModelBidirectionalBinding<T> implements ChangeListener<T>, WeakListener {
private final WeakReference<Property<T>> propertyRef1;
private final WeakReference<SelectionModel<T>> propertyRef2;
private boolean updating = false;
private final int cachedHashCode;
public SelectionModelBidirectionalBinding(Property<T> property1, SelectionModel<T> property2) {
cachedHashCode = property1.hashCode() * property2.hashCode();
propertyRef1 = new WeakReference<>(property1);
propertyRef2 = new WeakReference<>(property2);
@franz-josef-kaiser
franz-josef-kaiser / nano-shorts.md
Last active April 8, 2024 09:27
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@soyuka
soyuka / ObjectListener.php
Last active July 12, 2023 06:17
Streaming big json files the good way with php with https://soyuka.me/streaming-big-json-files-the-good-way/
<?php
namespace Fry;
use JsonStreamingParser\Listener;
/**
* This implementation allows to process an object at a specific level
* when it has been fully parsed
*/
class ObjectListener implements Listener
{
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@RichardHan
RichardHan / win_change_javapath_by_mklink
Created June 20, 2016 11:30
Windows change JAVA path by mklink