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 program is an adaptation of the Mandelbrot program | |
from the Programming Rosetta Stone, see | |
http://rosettacode.org/wiki/Mandelbrot_set | |
Compile the program with: | |
gcc -o mandelbrot -O4 mandelbrot.c | |
Usage: | |
./mandelbrot <xmin> <xmax> <ymin> <ymax> <maxiter> <xres> <out.ppm> | |
Example: |
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 | |
OLD=$(grep -rh '"app-id":' *.json | sed 's/[",]//g' | awk '{print $2}') | |
NEW=$1 | |
OLD2="${OLD//./\\.}" | |
OLD3="${OLD//.//}" | |
OLD4="${OLD//./\\/}" | |
NEW4="${NEW//./\\/}" | |
for s in $(find -name "*$OLD*"); do mv $s "${s/$OLD/$NEW}"; done | |
for s in $(grep -rIl $OLD2); do sed -i "s/$OLD2/$NEW/g" $s; done | |
for s in $(grep -rIl $OLD3); do sed -i "s/$OLD4/$NEW4/g" $s; done |