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
# Begrifflichkeiten: Shell = Kommandozeile Linux, Bash = Verbreitestes Shell-Programm | |
Angenommen du hast ein C++-File namens "hello.cc" | |
#include <stdio.h> | |
int main() { | |
printf("Hallo Welt\n"); | |
return 0; | |
} |
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 | |
# | |
# Notify when website changes-script: | |
# This is a simple mini program that informs you whenever a website | |
# changes. Can perform any job when triggered. | |
# Usage: | |
# ./notify "jobname fuer mail" "http://abc.def/interessant.html" | |
# The script will run "in foregrund". You can e.g. use GNU screen to detach it | |
# and run it in the background on a 24h-running-server: | |
# $ screen |
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 | |
base64 -d <<BASE | gunzip > blank.pdf | |
H4sICAEz+lIAA2JsYW5rLnBkZgCNVE1P20AQpa16WXEk970goCXsh712XCGkxB8RIgiU5ECbcjDO | |
AqHBRs66Cr32RvsTKvXSX1CpVZF6Kn+g6qWnnntHcO9snJCUILWW7PW+ed55b2bk+W0vKLIVE81f | |
fLj4evH54j3imOJk7witrpKajA/UITYAqZOg01UyJUE3VNKTUdKWa2uop1IZHqP+O+O70Vz8/ahJ | |
t+nMx1px8/rt3HJt9np57qx+/u3T3OWX+wVUuNr99Xqz8ONN4co9q809vyzcP58JH87+RDJuD0+C | |
N50cGUMVlnEDmWNhzdMTSXa29o5kpBBpZHtKA0GSHiNSqST9Fi462OQUW9TU6wrDu4hU0yQ7ga8b | |
pJmGce8kTGUcnRK3QTz5shPJerVCNrBKM+1sZL6E7nCOJq0/mIHr3h0exFiwW8Z0RSCMMYnCwSuc | |
MOLZN7xJtDT+OkhihTWrjkaudRFS8KZBrdbvq2pDgUAI+NWGwGIU2U6TqCFVi0CrSVP2FVk/Dg+k |
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 gist was an experiment to explore ways to model punch cards with Python nicely. | |
Focus was spent on good reability/introspection and fault tolerance (incomplete | |
punch cards/tristates) and not on performance. |
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
/** | |
* Kommentierte Fassung fuer ein Arduino-Testprogramm | |
**/ | |
// Anschlussbelegung: | |
#define PIN_ROT 2 | |
#define PIN_GRUEN 3 | |
#define PIN_BLAU 4 | |
// Taste (Button) an Pin 7 anschließen! |
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
CC=gcc | |
F90=gfortran | |
all: | |
${CC} -Wall -c main.c | |
${F90} -c aux.f90 | |
${CC} -o test main.o aux.o -lgfortran | |
clean: | |
rm *.o test |
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 "The-GIMP-exported-file.h" | |
#include <stdio.h> | |
/* This code converts a GIMP C export back to a readable PNM Image. Such | |
header file looks like | |
static const struct { | |
unsigned int width; | |
unsigned int height; | |
unsigned int bytes_per_pixel; // 2:RGB16, 3:RGB, 4:RGBA |
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
<?php | |
/* | |
* There is currently no pure PHP yaml parser capable of reading | |
* multi documents (--- separated). I have tested both spyc and Symfony's YAML. | |
* | |
* Therefore I parse YAML with Python, encode it to json and read the json in | |
* PHP. The json is cached on disk. | |
* | |
* Public Domain by http://github.com/svenk | |
*/ |
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
# A Firefox Quantum ViewSourceWith replacement for Windows | |
# | |
# Usage: | |
# (1) Save as C:\path\to\script.ps1 | |
# (2) In order to run your own powershell scripts, start PowerShell | |
# as Administrator and run the command | |
# | |
# Set-ExecutionPolicy RemoteSigned | |
# | |
# (2) You can test the proper running (from a user cmd): |
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
/** | |
* A Firefox Quantum ViewSourceWith replacement for Windows. | |
* When compiled, this behaves like an editor, i.e. you call | |
* it with a file as an argument. It tries to extract then | |
* the real file to open. | |
* | |
* Todo: | |
* | |
* 1) Read editor path from INI file with GetPrivateProfileString | |
* 2) hide the console when opening the real notepad |
OlderNewer