Skip to content

Instantly share code, notes, and snippets.

View stelabouras's full-sized avatar
😎

Stelios Petrakis stelabouras

😎
View GitHub Profile
@stelabouras
stelabouras / EdgeMapUtils.cs
Created October 10, 2023 16:29 — forked from Donnotron666/EdgeMapUtils.cs
CPU-Based Edge Detection
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace Editor.Utility
{
public static class EdgeMapUtils
{
@stelabouras
stelabouras / killbutmakeitlooklikeanaccident.sh
Created July 17, 2022 13:11 — forked from moyix/killbutmakeitlooklikeanaccident.sh
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'

After requesting the certificate from Apple (to do this, go to Apple Developer site -> APNs Auth key -> [+]), download the .cer file (usually named aps_production.cer or aps_development.cer) from the iOS Provisioning Portal, save in a clean directory, and import it into Keychain Access.

It should now appear in the keyring under the "Certificates" category, as Apple Push Services. Inside the certificate you should see a private key (only when filtering for the "Certificates" category).

Export this private key as a .p12 file:

  • Right click in the certificate we are interested in Keychain and select Export...
  • Accept the default .p12 file format and then click Save
### Keybase proof
I hereby claim:
* I am stelabouras on github.
* I am stelabouras (https://keybase.io/stelabouras) on keybase.
* I have a public key ASC9De02SA-hb_vYJnupknTZGfbod_wq_Dctx0rhbZ51uwo
To claim this, I am signing this object:
@stelabouras
stelabouras / HorizonSample.m
Last active February 27, 2020 14:05
Horizon SDK sample
// Initialize the camera
HVTCamera *camera = [HVTCamera new];
// Create a simple view
HVTView *videoPreview = [[HVTView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
videoPreview.center = self.view.center;
[self.view addSubview:videoPreview];
// Attach this view to your camera
[camera addView:videoPreview];
@stelabouras
stelabouras / loadAssetToInstagram.m
Last active October 4, 2024 20:15
Loads a Camera Roll Asset to Instagram (works for both photos & videos)
- (void)loadCameraRollAssetToInstagram:(NSURL*)assetsLibraryURL andMessage:(NSString*)message
{
NSString *escapedString = [assetsLibraryURL.absoluteString urlencodedString];
NSString *escapedCaption = [message urlencodedString];
NSURL *instagramURL = [NSURL URLWithString:[NSString stringWithFormat:@"instagram://library?AssetPath=%@&InstagramCaption=%@", escapedString, escapedCaption]];
[[UIApplication sharedApplication] openURL:instagramURL];
}
@stelabouras
stelabouras / downloadFromBasecamp.php
Last active February 27, 2020 14:06
Download all your file from Basecamp and organise them in folders
<?
// make sure the folder of the script is writeble (0777)
$basecampUrl = '[YOUR BASECAMP URL HERE]'; // e.g. https://stelabouras.basecamphq.com/ (Don't forget the trailing slash!)
$apiKey = '[YOUR API KEY HERE]'; // e.g. one huge string (found in 'My info' in the Authentication tokens section)
function BasecampCall($endPoint, $usePrefix = true) {
global $apiKey, $basecampUrl;
// From: http://prattski.com/2008/10/22/basecamp-api-examples-using-php-and-curl-get/
@stelabouras
stelabouras / storeMinecraftToDropbox.sh
Last active February 27, 2020 14:06
Create a link from your Dropbox saves to your MineCraft saves
ln -s /[path to your Dropbox directory]/Minecraft/saves /Users/[your MacOSX username]/Library/Application\ Support/minecraft/
@stelabouras
stelabouras / eraseTumblrPosts.php
Last active February 27, 2020 14:06
Erase all your posts from your Tumblr account
<?php
// ------WARNING------
// RUNNING THIS FILE WITH THE APPROPRIATE CREDENTIALS WILL
// ERASE ALL YOUR POSTS FROM YOUR TUMBLR BLOG!
// Tumblr Blog Info
//replace YOUR-TUMBLR-EMAIL with the email you are using to login to Tumblr
$tumblrEmail = 'YOUR-TUMBLR-EMAIL';