Skip to content

Instantly share code, notes, and snippets.

View ramiabraham's full-sized avatar

Rami Abraham ramiabraham

View GitHub Profile
@ramiabraham
ramiabraham / rom_suffix_codes.md
Last active April 27, 2024 13:28
Video game rom suffix codes (decoded)

Video game rom codes

You wouldn't download a car...


Primary rom codes

Probably what you're looking for

  • [a] Alternate (alternate version of the game, usually trying a different output method)
  • [p] Pirate
@ramiabraham
ramiabraham / console.loog.js
Created January 24, 2024 20:28
console.loog.js
let loog =
console.loog = function(){
Array.prototype.unshift.call(
arguments, loog );
console.log.apply( console, arguments );
};
@ramiabraham
ramiabraham / TinyTS_v11.ino
Created January 3, 2017 18:10
The Tiny-TS Touch Synthesizer
// (*) All in the spirit of open-source and open-hardware
// Janost 2016 Sweden
 
// The Tiny-TS Touch Synthesizer
// https://janostman.wordpress.com/the-tiny-ts-diy-touch-synthesizer/
 
// Copyright 2016 DSP Synthesizers Sweden.
//
// Author: Jan Ostman
//
@ramiabraham
ramiabraham / web.config
Created September 18, 2015 00:08
IIS web.config 301 and 302 redirect examples
<?xml version="1.0"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://foo.com/newdir" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
<?xml version="1.0"?>
<configuration>
<system.webServer>
@ramiabraham
ramiabraham / gethooks
Last active April 21, 2023 13:38
Copy all actions and filters in a plugin and save to a file.
#!/bin/bash
#
# Prints all hooks in a dir to a .log file.
#
# Permissions issues:
# run: chmod +x gethooks
#
# gist: https://gist.github.com/ramiabraham/e8356e00130351ddcbe2c62125e6c52a
#
# Easy usage:
@ramiabraham
ramiabraham / README.md
Last active April 13, 2023 15:17
Get all public gists by EAL; https://gist.github.com/ericandrewlewis.
@ramiabraham
ramiabraham / bash_colors
Last active March 28, 2023 23:39 — forked from ian128K/bash_colours
Shell script colours
## Colours and font styles
## Syntax: echo -e "${FOREGROUND_COLOUR}${BACKGROUND_COLOUR}${STYLE}Hello world!${RESET_ALL}"
# Escape sequence and resets
ESC_SEQ="\x1b["
RESET_ALL="${ESC_SEQ}0m"
RESET_BOLD="${ESC_SEQ}21m"
RESET_UL="${ESC_SEQ}24m"
# Foreground colours
@ramiabraham
ramiabraham / exec_time.sh
Last active March 28, 2023 23:39
Determines the amount of execution time for a process.
# Output in minutes:
START=$(date +%s)
END=$(date +%s)
DIFF=$(( $END - $START ))
DIFF=$(( $DIFF / 60 ))
echo DIFF
# Full output:
res1=$(date +%s.%N)
@ramiabraham
ramiabraham / affwp_custom_meta_box_example.php
Last active May 11, 2022 04:51
AffWP Custom Meta Box Example
<?php
/**
* Plugin Name: AffWP Custom Meta Box Example
* Plugin URI: https://affiliatewp.com
* Description: AffWP Custom Meta Box Example
* Author: AffiliateWP, LLC
* Author URI: https://affiliatewp.com
* Version: 1.0
* Text Domain: affwp-custom-meta-box-example
* */
@ramiabraham
ramiabraham / rcp_add_affwp_affiliate_at_rcp_sub.php
Last active May 11, 2022 04:16
Add AffiliateWP affiliate when RCP subscription occurs (requires specifying desired RCP action, and subscription).
<?php
function rcp_add_affwp_affiliate_at_rcp_sub() {
$user_info = get_userdata();
$user_id = $user_info->user_id;
$member = new RCP_Member( $user_id );
$subscription_id = $member->get_pending_subscription_id();