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
#import <CoreData/CoreData.h> | |
@interface NSManagedObjectContext (SafeMerge) | |
@end |
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 | |
// | |
// executeRequest | |
// | |
// uses cURL to run a http(s) request. | |
// data, contentType, user, password are all optional | |
// | |
function executeRequest($target, $data, $contentType, $user, $password, &$http_status) { | |
//try to send request to remote |
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/ruby | |
require 'xcodeproj' | |
projects = { | |
'my app: variant a' => '/Users/dpich/Desktop/e80f427ed_a.xcodeproj', | |
'my app: variant b' => '/Users/dpich/Desktop/e80f427ed_a_modified.xcodeproj', | |
} | |
puts "# File Counts" |
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
p="/Users/dpich/Desktop/t/bilder/impressionen/" | |
echo $p | |
t="/Users/dpich/Dropbox (Personal)/Maria's Art/__Copies For Website/Impressionen/" | |
echo $t | |
cd "$t" | |
for f in `ls $p`; do | |
file=$p/$f | |
img=`pcregrep -o1 -e "<img src=\"(.*_med).*\\.jpeg\"" "$file"` | |
img_path=$p/$img"_hr.jpeg" |
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 | |
files=`find ~/Desktop/maria -name *_med*.jpeg -a -not -name maria*.jpeg` | |
text="© Maria Pich 2020" | |
for file in $files; do | |
echo "Add watermark to $file" | |
magick convert "$file" -font Helvetica -pointSize 15 -draw "gravity SouthEast fill grey text 50,30 '$text' fill white text 51,31 '$text'" "$file" | |
done |
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 f in ~/Library/MobileDevice/Provisioning\ Profiles/* | |
do | |
echo \ | |
$(basename "${f%.*}") \ | |
"=> " \ | |
`security cms -D -i "$f" | plutil -extract "Entitlements.application-identifier" xml1 -o - -- - | sed -n -e 's/.*<string>\(.*\)<\/string>.*/\1/p'` | |
echo " Name: "\ |
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
import plistlib | |
import sys | |
with open(sys.argv[1],"rb") as input: | |
plist = plistlib.load(input) | |
with open(sys.argv[2],"wb") as output: | |
plistlib.dump(plist, output) |
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
var ServerMock = require("mock-http-server"); | |
// Run an HTTP server on localhost:9000 | |
var server = new ServerMock({ host: "localhost", port: 9000 }); | |
server.start(Function()); | |
server.on({ | |
method: '*', | |
path: '*', |
NewerOlder