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
mkdir thumb && ls *jpg | xargs -I{} -n1 convert -resize 10% "{}" "thumb/{}" |
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
void HSV_to_RGB(float h, float s, float v, byte *r, byte *g, byte *b) | |
{ | |
int i,f,p,q,t; | |
h = max(0.0, min(360.0, h)); | |
s = max(0.0, min(100.0, s)); | |
v = max(0.0, min(100.0, v)); | |
s /= 100; | |
v /= 100; |
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/sh | |
# pounding ubuntu into working with awesome and some gnome features like panel | |
gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager awesome | |
cd ~ | |
rm -f ~/.xsession ~/.xinitrc | |
echo '#!/bin/sh' > .xinitrc | |
echo -e "gnome-settings-daemon &\ngnome-panel &\nnm-applet &\npidgin &\ngnome-volume-manager &\nexec awesome" >> .xinitrc | |
ln -s .xinitrc .xsession | |
echo -e "[Desktop Entry]\nVersion=1.0\nType=Application\nName=Awesome\nComment=The awesome launcher!\nTryExec=awesome\nExec=awesome" > ~/.local/share/applications/awesome.desktop | |
sudo echo -e "[Desktop Entry]\nName=Xsession\nComment=Xsession for awesome\nExec=/etc/X11/Xsession\nX-Ubuntu-Gettext-Domain=gdm" > /usr/share/xsessions/xsession.desktop |
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 | |
# for all Nikon raw files in thhe folder | |
for file in *.NEF; do | |
# get create date of file | |
date=$(stat -c %y "$file" | awk '{print $1}') | |
# if there's no folder with this date yet, create one | |
if [[ ! -d "$date" ]]; then | |
mkdir "$date" |
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
CultureInfo c = new CultureInfo("en-US"); | |
// make formatting of output adhere to culture (eg. number format) | |
Thread.CurrentThread.CurrentCulture = cult; | |
// force exceptions to be displayed localized to selected culture | |
Thread.CurrentThread.CurrentUICulture = cult; |
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 "stdlib.h" | |
void inputNumbers(int *size, double **numbers) | |
{ | |
// Abfrage nach Anzahl der Zahlen | |
printf("Anzahl der zu speichernden Zahlen:\n"); | |
scanf("%d", size); | |
// Entsprechende Menge Speicher reservieren |
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
Software development | |
- Which platforms (Linux, Windows, Mac, Embedded) will I develop for? | |
- What programming languages are you using for which kind of projects / applications? | |
- What Development Environment are you using? | |
- Are you using any coding style guidelines? If yes, can I take a look at the document? | |
- Are you actively supporting / allowing time for keeping your code base maintainable and up to date? | |
- How do you handle documentation? Is there time reserved specifically for documenting projects? |
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
// this is a very basic mutex implementation | |
// its aim is to try to acquire access to a critical section or fail. | |
// there is no spinlock or event-waiting going on. | |
// in case it fails to acquire the lock, it simply returns false. | |
// | |
// | |
// relevant read: | |
// | |
// Synchronization primitives | |
// http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABHCIHB.html |
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
#/usr/bin/perl | |
# | |
# condense duplicate rows of XVI32 hexeditor text printouts | |
# | |
# usage: | |
# cat file.txt | perl condense.pl | |
# | |
# sample output: | |
# 000000704: 53 0A 70 0D 08 00 A8 34 00 20 00 00 00 00 00 00 | |
# 000000720: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
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
#!/usr/bin/perl | |
system("rm -rf sandbox"); | |
mkdir("sandbox"); | |
chdir("sandbox"); | |
system("git init"); | |
sub addFilesWCommits() | |
{ | |
map { $file = $_; |
OlderNewer