Skip to content

Instantly share code, notes, and snippets.

@Daij-Djan
Daij-Djan / button_mash_ps5.gph
Created Dec 10, 2021
Button mash for PS5:: Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash), On / Off: Press create button : to disabled/enable AutoCombo. (rumbles on activate), Hold create button 1s for normal options menu
View button_mash_ps5.gph
#pragma METAINFO("button_mash_ps5", 1, 1, "Daij-Djan")
#include <ps5.gph>
/*
<shortdesc>
Button mash for PS5
AutoCombo : Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
On / Off : Press share button : to disabled/enable AutoCombo. (rumbles on activate)<br>
Hold share button 1s for normal options menu
</shortdesc>
@Daij-Djan
Daij-Djan / xcode_project_file_count.rb
Created Jul 5, 2021
show use of xcodeproj package
View xcode_project_file_count.rb
#!/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"
View copy images referenced by html.sh
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"
View bulk_watermark.sh
#!/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
@Daij-Djan
Daij-Djan / listprofiles.sh
Last active Jan 31, 2020
get provisioning profiles and their bundle ids, names and creation dates
View listprofiles.sh
#!/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: "\
@Daij-Djan
Daij-Djan / button_mash.gpc
Created Jan 29, 2020
button_mash.gpc is a script for console tuner that implements 'rapid fire'/button mash. Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
View button_mash.gpc
#pragma METAINFO("button_mash", 1, 1, "daij-djan")
#include <ps4.gph>
/*
<shortdesc>
***** Button mash@l (PS4) *****<br>
AutoCombo : Holding down square, cross, circle or triangale button for automatic repetition instead of press (fast button mash)<br>
On / Off : Press share button : to disabled/enable AutoCombo. (rumbles on activate)<br>
Hold share button 1s for normal options menu
</shortdesc>
@Daij-Djan
Daij-Djan / sort-plist.py
Created Jan 22, 2020
this snippet sort plists keys so i can better diff them
View sort-plist.py
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)
@Daij-Djan
Daij-Djan / mock-http-server.js
Created Oct 3, 2019
simple mock HTTP server in node (using mock-http-server npm package)
View mock-http-server.js
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: '*',
@Daij-Djan
Daij-Djan / plist-to-json.swift
Created Jul 20, 2017
small swift 3 tool to convert an apple plist to json
View plist-to-json.swift
//
// main.swift
// plist-to-json
//
// Created by Dominik Pich on 20.07.17.
// Copyright © 2017 Dominik Pich. All rights reserved.
//
import Foundation
@Daij-Djan
Daij-Djan / ps_osx.sh
Created Jan 26, 2017
PS for OSX:: Runs 'ps ax' and verify the code signature of every running proccess using apple's 'codesign' tool
View ps_osx.sh
#!/bin/sh
IFS=$'\n'
#help text
usage="$(basename "$0") [-h or -?] [-i] [-a] [-s] [-d] [-u] [-s] [-b]
Runs 'ps ax' and verify the code signature of every running proccess using apple's 'codesign' tool
-h/-? :: help for command
-i :: dont show an inital count before analyzing each process