Skip to content

Instantly share code, notes, and snippets.

View Daij-Djan's full-sized avatar

Dominik Pich Daij-Djan

View GitHub Profile
import CocoaLumberjack
import Security
public class EncryptedLogger: DDAbstractLogger {
let key: SecKey!
let blockSize : Int
let padding : SecPadding
init(key: SecKey!, blockSize : Int = 128, padding: SecPadding = .PKCS1) {
self.key = key
package info.pich.camunda.bmp.configuration;
import lombok.Data;
import org.camunda.bpm.engine.AuthorizationService;
import org.camunda.bpm.engine.IdentityService;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.authorization.Groups;
import org.camunda.bpm.engine.authorization.Resource;
import org.camunda.bpm.engine.authorization.Resources;
import org.camunda.bpm.engine.identity.Group;
@Daij-Djan
Daij-Djan / sinatra-command.rb
Created January 19, 2017 15:24
Run a local Webserver with Sinatra that can do actions on your Mac. I mainly want /quiet for my hacked amazon dash button And/Or home control
#!/usr/bin/env ruby
require 'sinatra'
get '/hello' do
value = `osascript -e 'tell app "System Events" to display dialog "Hello"'`
end
get '/lock' do
value = `"/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession" -suspend`
@Daij-Djan
Daij-Djan / ps_osx.sh
Created January 26, 2017 15:18
PS for OSX:: Runs 'ps ax' and verify the code signature of every running proccess using apple's 'codesign' tool
#!/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
@Daij-Djan
Daij-Djan / plist-to-json.swift
Created July 20, 2017 13:50
small swift 3 tool to convert an apple plist to json
//
// 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 / mock-http-server.js
Created October 3, 2019 00:07
simple mock HTTP server in node (using mock-http-server npm package)
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 / sort-plist.py
Created January 22, 2020 03:37
this snippet sort plists keys so i can better diff them
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 / button_mash.gpc
Created January 29, 2020 17:33
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>
#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 / listprofiles.sh
Last active January 31, 2020 00:44
get provisioning profiles and their bundle ids, names and creation dates
#!/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: "\
#!/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