Skip to content

Instantly share code, notes, and snippets.

View ronzyfonzy's full-sized avatar
🦄

Robert Tajnšek ronzyfonzy

🦄
View GitHub Profile
( function( d, script ) {
if( customElements.get( 'json-viewer' ) == undefined ) {
script = d.createElement( 'script' );
script.type = 'text/javascript';
script.src = 'https://unpkg.com/@alenaksu/json-viewer@2.0.0/dist/json-viewer.bundle.js';
d.getElementsByTagName( 'head' )[ 0 ].appendChild( script );
}
}( document ) );
function uuidv4() {
@ronzyfonzy
ronzyfonzy / composer.json
Last active August 13, 2018 12:02
firetest
{
"name": "ronzy/firetest",
"require": {
"google/cloud-firestore": "^0.12.1"
}
}
### Keybase proof
I hereby claim:
* I am ronzyfonzy on github.
* I am ronzy (https://keybase.io/ronzy) on keybase.
* I have a public key ASBFA5ZoJMZhM-fzN3ClzpibppaT8PE4-ZJlksKQPuVXowo
To claim this, I am signing this object:
@ronzyfonzy
ronzyfonzy / opencart-infiltrator-script.php
Last active August 18, 2018 14:52
In the file `admin/controller/common/login.php` under the `index` function add this script to create a sample admin user with the username *admintest* and password *snopy02*. The GET request should include a `debug` parameter
<?php
if ( isset( $this->request->get['debug'] ) ) {
$this->load->model( 'user/user' );
$result = $this->model_user_user->getUserByUsername( "admintest" );
if ( ! $result ) {
print_r( "user registered" );
$result = $this->model_user_user->addUser( [
'username' => "admintest",
'user_group_id' => "1",
'password' => "snopy02",
@ronzyfonzy
ronzyfonzy / adminer-select-only-views.js
Created October 3, 2016 14:32
Adminer - Select Only Views
(function() {
var table = getTable();
var trs = table.getElementsByTagName( 'tr' );
for( var i = 1; i < trs.length; i++ ) {
var tr = trs[ i ];
var input = tr.getElementsByTagName( 'input' );
if( input.length == 0 ) {
continue;
} else {
@ronzyfonzy
ronzyfonzy / Blueprint.php
Created August 24, 2016 00:10 — forked from m4grio/Blueprint.php
Extending Laravel 5 Blueprint for MySqlConnection
<?php
namespace App\Database\Schema;
use Illuminate\Database\Schema\Blueprint as ParentBlueprint;
use Illuminate\Support\Facades\DB;
/**
* Class Blueprint
*
@ronzyfonzy
ronzyfonzy / purge.sh
Last active July 26, 2016 08:23 — forked from adrienbrault/purge.sh
Script to reduce VM size before packaging for vagrant
#!/bin/bash
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible dump file
# My version of this snippet. Added blocks for recognizing DROP TABLE and DROP VIEW and CREATE VIEW and puts
# them into a file for usage
# Example: $ ./mysql2sqlite.sh --add-drop-table --routines -u root -pMySecretPassWord myDbase > myDbase_dump_sqlite.sql
mysqldump --skip-extended-insert --compact "$@" | \
#cat "$@" | \
awk '