Skip to content

Instantly share code, notes, and snippets.

View shvelo's full-sized avatar

Nikoloz Shvelidze shvelo

View GitHub Profile
@shvelo
shvelo / CORE.lua
Created November 29, 2018 10:40
Fix for PSPInstaller, open /PSP/GAME/PSPInstallerAE/CORE.LUA and overwrite the contents with this
-- DO NOT REPRODUCE THIS CODE WITHOUT PERMISSION
-- IT DAMAGES THE HOMEBREW COMMUNITY
-- PSPInstaller Adrenaline Edition by Richard Sparrow (spike_132000/TheMeq)
IMG_BACK = pge.texture.load("INC/IMG_BACK.PNG")
IMG_STAR = pge.texture.load("INC/IMG_STAR.PNG")
IMG_LOGO = pge.texture.load("INC/IMG_LOGO.PNG")
IMG_SEA = pge.texture.load("INC/IMG_SEARCH.PNG")
IMG_OPT = pge.texture.load("INC/IMG_OPTIONS.PNG")
IMG_ABO = pge.texture.load("INC/IMG_ABOUT.PNG")
@shvelo
shvelo / sixpair.c
Created February 13, 2017 21:19
Sixpair for PS Move Navigation Controller, needs to be compiled with `-lusb`
/*
* Copyright (c) 2007, 2008 pascal@pabr.org
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@shvelo
shvelo / Booking.php
Created September 19, 2016 11:12
I wrote this 5 years ago, I think it's for determining available times for booking car wash, but I have no idea how it works
<?php
public function get_available_times($serv, $date = false)
{
$CI = &get_instance();
$opening = 9 * 60;
$closing = 19 * 60;
$available = array();
@shvelo
shvelo / steamfix.sh
Last active June 22, 2016 19:31
Fix Steam not running on new Linux libraries
#!/bin/bash
find ~/.steam/root/ -name "libgcc_s.so*" -print -delete
find ~/.steam/root/ -name "libstdc++.so*" -print -delete
find ~/.steam/root/ -name "libxcb.so*" -print -delete
find ~/.steam/root/ -name "libgpg-error.so*" -print -delete
@shvelo
shvelo / translit.rb
Created October 22, 2015 11:17
KA -> EN Translit
# encoding: utf-8
def translit text
out = text
translit_compound_from = "ჩჭღძშჟ".split ""
translit_compound_to = "chchghdzshzh".scan /../
translit_single_from = "ქწერტთყუიოპასდფგჰჯკლზხცვბნმ".split ""
translit_single_to = "qwerttyuiopasdpghjklzxcvbnm".split ""
@shvelo
shvelo / netuse.sh
Last active August 29, 2015 14:13
Network interface usage in kb/s in format down,up every 3 seconds. usage: ./netuse.sh <interface>
#!/bin/bash
delay=3
while true; do
mon_total_down_old=$(cat /proc/net/dev | grep $1 | awk '{print $2}')
mon_total_up_old=$(cat /proc/net/dev | grep $1 | awk '{print $10}')
sleep 1
mon_total_down=$(cat /proc/net/dev | grep $1 | awk '{print $2}')
mon_total_up=$(cat /proc/net/dev | grep $1 | awk '{print $10}')
@shvelo
shvelo / download-all-files.js
Last active August 29, 2015 14:07
Download all images on page. (dangerous, can open shit ton of windows)
var downloadLink = document.createElement('a');
downloadLink.download = true;
for(i in document.images) { downloadLink.href = document.images[i].src; downloadLink.click() };
@shvelo
shvelo / gradle.properties
Created June 6, 2014 10:01
Faster Gradle builds
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
@shvelo
shvelo / source.js
Last active August 29, 2015 13:56
Replace Body content with HTML source
(function(){
var code_container = document.createElement("div");
code_container.id = "code_container";
code_container.innerText = document.documentElement.innerHTML;
code_container.innerHTML = "<pre><code>"+ code_container.innerHTML + "</code></pre>";
document.body.appendChild(code_container);
// More at https://github.com/isagalaev/highlight.js/tree/master/src/styles
@shvelo
shvelo / Mario.ino
Last active December 30, 2015 12:29 — forked from gskielian/Mario.ino
int spk = 0;
void setup() {}
void loop() {
tone(spk,660,100);
delay(150);
tone(spk,660,100);
delay(300);
tone(spk,660,100);