This file contains 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
(* | |
Copyright (c) 2012, Davide Gessa (dakk) | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided | |
that the following conditions are met: | |
- Redistributions of source code must retain the above copyright notice, this list of conditions and the | |
following disclaimer. | |
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and |
This file contains 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
TITLE=`youtube-dl $1 -e` | |
youtube-dl $1 -o "$TITLE.flv" | |
ffmpeg -i "$TITLE.flv" -f mp3 "$TITLE.mp3" | |
rm "$TITLE.flv" |
This file contains 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
montage $1 -coalesce -geometry '+0+0' -tile x1 -background none -bordercolor none montage.gif |
This file contains 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
menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_OK, NULL); | |
GtkWidget* menu_label = gtk_bin_get_child(GTK_BIN(menu_item)); | |
gtk_label_set_text(GTK_LABEL(menu_label), "new label text"); |
This file contains 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
open System | |
open Microsoft.Xna.Framework | |
open Microsoft.Xna.Framework.Graphics | |
open Microsoft.Xna.Framework.Storage | |
open Microsoft.Xna.Framework.Input | |
/// Logical type of a MapCell | |
type CellType = | |
| Empty |
This file contains 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 | |
/opt/adt/sdk/platform-tools/adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $1.png |
This file contains 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 <stdio.h> | |
#include <malloc.h> | |
#define N 8 | |
/** Recursive delete like a pro | |
* where: 'ar' is the array, 'n' is the size, 'start' is 0 when | |
* called first time, 'irem' is the index of element to remove. | |
* @return the new size of the array (n-1) |
This file contains 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 <stdio.h> | |
#include <malloc.h> | |
#define N 9 | |
#define M 5 | |
void print_ar (int *a, int n) | |
{ | |
for (int i=0;i<n;i++) printf ("%d ", a[i]); |
This file contains 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
Verifying that +dakk is my openname (Bitcoin username). https://onename.com/dakk |
This file contains 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
def try_for (fun, par, done, times): | |
while times > 0: | |
try: | |
a = fun (par) | |
done (a) | |
return | |
except: | |
times -= 1 | |
time.sleep (1) |
OlderNewer