Skip to content

Instantly share code, notes, and snippets.

View rpong's full-sized avatar

Arpee Ong rpong

  • OLX PH
  • Philippines
View GitHub Profile
@rpong
rpong / gist:0956b1a26f4af1d53e5ac466f3ef2a63
Created March 26, 2024 10:11
ableton-push-mk1-rekordbox.csv
@file,1,Ableton Push User Port
NoFunction,,Button,,B016,,,,,B016,,,,,
NoFunction,,DdjSxPad,,8025,B040,,8029,,8025,,,A040,Fast;,
NoFunction,,DdjSxPad,,8026,C040,,802A,,8026,,,A041,Fast;,
NoFunction,,DdjSxPad,,8027,,,802B,,8027,,,A042,Fast;,
NoFunction,,DdjSxPad,,802C,,,8030,,802C,,,A043,Fast;,
NoFunction,,DdjSxPad,,802D,,,8031,,802D,,,A038,Fast;,
NoFunction,,DdjSxPad,,802E,,,8032,,802E,,,A039,Fast;,
NoFunction,,DdjSxPad,,802F,,,8033,,802F,,,A03A,Fast;,
NoFunction,,DdjSxPad,,8034,,,8038,,8034,,,A03B,Fast;,
@rpong
rpong / Possible Botnet IPs from RIPE
Created March 8, 2021 12:37
Possible Botnet IPs from RIPE
193.202.10.29
194.156.124.120
146.185.202.97
83.171.227.33
147.78.183.235
185.102.112.249
176.9.9.125
62.138.8.193
213.108.2.40
193.202.87.190
#!/bin/bash
#Redis Servers
array=( cache2 cache1 cache3 )
#output file
outputConfig='/config/redis.json'
function outputRedisConfig {
echo "{
@rpong
rpong / optimizeSolr.py
Last active April 7, 2020 14:28
optimize all cores in a given solr instance. Sample Usage: ./optimizeSolr.py http://solr1:8970
#! /usr/bin/env python
# Sample Usage: ./optimizeSolr.py http://solr1:8970
import xml.etree.ElementTree as ET;
import requests;
import time;
import sys;
if len(sys.argv) > 1 :
rootSolrUrl = sys.argv[1];
r = requests.get(rootSolrUrl + '/solr/admin/cores');
root = ET.fromstring(r.content);
@rpong
rpong / rotateImage.js
Last active September 29, 2015 06:52
rotateImage.js
setInterval(function(){
$('.fleft').each(function() {
var randVal = Math.floor((Math.random() * 10) + 1);
if (randVal == 1 || randVal == 7) {
return;
}
if (this.src != undefined) {
var randVal = Math.floor((Math.random() * 2) + 1);
switchFrom = '_' + randVal + '_';
<?php
include_once 'common.php';
print_r(debug_backtrace());
logDebug("this is a test debug message #6", __FILE__, __LINE__, debug_backtrace());
@rpong
rpong / gist:34c581166afd9c16d058
Last active August 29, 2015 14:06
checkDevice
function checkDevice(mode) {
if (mode == 'ios') {
device = ['ipad', 'iphone', 'ipod'];
} else if (mode == 'android') {
device = ['android'];
}
var i = 0;
for ( ; i < device.length ; i++ ) {
if( navigator.platform.toLowerCase() == device[i]){
<?php
include_once 'common.php';
$onlineReceipts =& getInstance('OnlineReceipts');
$orId = 1;
$manager =& getInstance('Manager');
$manager->init('update', 'admin', 'onlineReceipts', null);
$manager->useView=1;
$fileRef = $onlineReceipts->generatePDF($orId, $manager);