Skip to content

Instantly share code, notes, and snippets.

View Jarvizx's full-sized avatar
🎯
Focusing

Robin Jarvizx

🎯
Focusing
View GitHub Profile
@Jarvizx
Jarvizx / git_examples.sh
Created October 8, 2019 18:38
git_examples
#!/bin/bash
##########
# contents
##########
# contents
# notes
# script setup
# git config files
@Jarvizx
Jarvizx / slow-log-to-csv.rb
Last active June 13, 2019 18:00
Ruby parse slow query to CSV (mysql-slow.log)
require 'csv'
def get_max_lines_file(file)
count = 0
file = File.open(file, "r") { |file| file.each_line { |line| count += 1 }}
return count
end
def fit_log(file_in, file_out)
# vars
@Jarvizx
Jarvizx / EEG_PayU_Standard.gateway.php
Created October 9, 2016 17:53
Event Espresso 4 PayU Gateway
<?php
if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
class EEG_PayU_Standard extends EE_Offsite_Gateway {
const itemized_payment_option_name = '_itemized_payment';
protected $_payu_id = NULL;
protected $_image_url = NULL;
protected $_gateway_url = NULL;
@Jarvizx
Jarvizx / GPU-EC2.sh
Created July 20, 2016 17:01 — forked from soulslicer/GPU-EC2.sh
OpenCL on GPU instance
# This script installs everything you need on an EC2 GPU Instance
# Create an Ubuntu 12.04 GPU Instance with at least 16GB of free space
# Base packages
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install gcc git cmake
# CUDA/Nvidia installations
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb