Skip to content

Instantly share code, notes, and snippets.

Savvas Radevic medigeek

Block or report user

Report or block medigeek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@medigeek
medigeek / ebay_siteid_sitename_globalid_map.php
Created Jul 7, 2018
eBay Site ID to Global ID Mapping PHP array
View ebay_siteid_sitename_globalid_map.php
<?php
// Just a basic concept/array of eBay Site ID, Global ID and Site Name
// https://developer.ebay.com/devzone/merchandising/docs/concepts/siteidtoglobalid.html
$ebay_array = [
"siteid" => [
"0", "2", "3", "15", "16",
"23", "71", "77", "100", "101",
"123", "146", "186", "193", "201",
"203", "205", "207", "210", "211",
@medigeek
medigeek / joomla-reset-two-factor.php
Created Apr 9, 2018
Joomla 3.x - Disable two factor authentication plugin, clear otpKey and otep values for all Super Users
View joomla-reset-two-factor.php
<?php
/* This script disables Joomla!'s two factor authentication
* plugin and clears the otpKey and otep values for Super
* Users. It allows you to login when you aren't able to
* use Google authenticator for any reason.
* Usage:
* Place it in the Joomla! 3.x root dir (where configuration.php
* and index.php are) and run it. Then login and leave the
@medigeek
medigeek / pyurl2file.py
Created Jul 25, 2012
Improve http://stackoverflow.com/a/22776/286994 (using .format() instead of % string formatting)
View pyurl2file.py
#!/usr/bin/python
# Improve http://stackoverflow.com/a/22776/286994
# (using .format() instead of % string formatting)
import sys
import urllib2
file_name = url.split('/')[-1]
u = urllib2.urlopen(url)
f = open(file_name, 'wb')
@medigeek
medigeek / ignore_fiemap_errors.patch
Created Mar 9, 2012
libarchive 3.x - quilt patch: Ignore FIEMAP errors on linux < 2.6.28 - e.g. https://bugs.launchpad.net/bugs/942994
View ignore_fiemap_errors.patch
Origin: https://code.google.com/p/libarchive/issues/detail?id=238
Description: Ignore FIEMAP errors on linux < 2.6.28
(most launchpad build daemon servers use ubuntu hardy)
https://bugs.launchpad.net/bugs/942994
Index: libarchive-3.0.3/libarchive/archive_read_disk_entry_from_file.c
===================================================================
--- libarchive-3.0.3.orig/libarchive/archive_read_disk_entry_from_file.c 2012-03-15 23:48:52.000000000 +0100
+++ libarchive-3.0.3/libarchive/archive_read_disk_entry_from_file.c 2012-03-15 23:49:00.000000000 +0100
@@ -855,16 +855,9 @@
@medigeek
medigeek / 02_fix-infinite-loop.patch
Created Mar 4, 2012
quilt patch: fix infinite loop in libarchive when reading xps file [fixes conversion issue for libgxps-utils (e.g. xpstopdf)]
View 02_fix-infinite-loop.patch
Origin: https://code.google.com/p/libarchive/issues/detail?id=226
Description: Fix issue 226 (infinite loop while using libgxps-utils).
The patch is from this merge (adopted to match 3.0.3 release):
https://github.com/libarchive/libarchive/commit/f7cd53ca1eda0d08fc3b3876ed474321b9f70ac7
Index: libarchive-3.0.3/libarchive/archive_read_support_format_zip.c
===================================================================
--- libarchive-3.0.3.orig/libarchive/archive_read_support_format_zip.c 2012-03-04 16:01:31.000000000 +0100
+++ libarchive-3.0.3/libarchive/archive_read_support_format_zip.c 2012-03-04 16:08:52.000000000 +0100
@@ -1093,7 +1093,7 @@
@medigeek
medigeek / pamtest.py
Created Feb 22, 2012
Idea for timekpr
View pamtest.py
#!/usr/bin/python
# sudo ./pamtest.py <username>
# If your run this as root, you don't need authentication.
# Perfect for True or False (if user is allowed to login or not)
import sys
import PAM
from getpass import getpass
def pam_conv(auth, query_list, userData):
View Makefile
#!/usr/bin/make -f
# -*- makefile -*-
# Copyright (c) 2012, Savvas Radevic <vicedar@gmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@medigeek
medigeek / fix_makefile.patch
Created Feb 7, 2012
glossa-interpreter: Fix Makefile (quilt patch)
View fix_makefile.patch
From: Savvas Radevic <vicedar@gmail.com>
Description: Create /usr/bin in the destination folder
Index: glossa-interpreter-1.0.1/Makefile
===================================================================
--- glossa-interpreter-1.0.1.orig/Makefile 2012-02-07 17:14:00.000000000 +0100
+++ glossa-interpreter-1.0.1/Makefile 2012-02-07 17:14:01.000000000 +0100
@@ -36,6 +36,7 @@
install:
@medigeek
medigeek / remove_absolute_paths.patch
Created Feb 7, 2012
glossa-interpreter: Remove absolute paths (quilt patch)
View remove_absolute_paths.patch
From: Savvas Radevic <vicedar@gmail.com>
Description: Remove absolute path from filenames
Index: glossa-interpreter-1.0.1/src/glossa/interpreter/core/ASTInterpreter.java
===================================================================
--- glossa-interpreter-1.0.1.orig/src/glossa/interpreter/core/ASTInterpreter.java 2012-02-07 16:24:50.000000000 +0100
+++ glossa-interpreter-1.0.1/src/glossa/interpreter/core/ASTInterpreter.java 2012-02-07 16:29:24.000000000 +0100
@@ -202,7 +202,7 @@
@medigeek
medigeek / fix_makefile.patch
Created Feb 5, 2012
lingua: Makefile (quilt patch)
View fix_makefile.patch
From: Savvas Radevic <vicedar@gmail.com>
Description: Fix Makefile:
* Change main installation path to /usr/share/java/lingua
* mkdir /usr/bin
* Remove $(DESTDIR) from /usr/bin/lingua contents
Index: lingua-0.0.4/Makefile
===================================================================
--- lingua-0.0.4.orig/Makefile 2012-02-07 21:10:49.000000000 +0100
+++ lingua-0.0.4/Makefile 2012-02-07 21:10:50.000000000 +0100
You can’t perform that action at this time.