Skip to content

Instantly share code, notes, and snippets.

View gtgt's full-sized avatar
🏠
Working from home

GT gtgt

🏠
Working from home
View GitHub Profile
@gtgt
gtgt / jira.dark.userstyle
Last active March 7, 2022 15:07
Wide jira
/* ==UserStyle==
@name Dark Jira
@namespace gist.github.com/gtgt
@version 1.0.0
@description Jira for people who like dark user interfaces...
@author GT
==/UserStyle== */
@-moz-document domain("atlassian.net") {
html {
background: #222;
@gtgt
gtgt / cowroot.c
Last active December 5, 2021 21:30 — forked from joshuaskorich/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@gtgt
gtgt / eg
Created November 17, 2021 12:36
easy-git wrapper
#!/usr/bin/perl -w
## Easy GIT (eg), a frontend for git designed for former cvs and svn users
## Version 1.7.5.2
## Copyright 2008-2013 by Elijah Newren and others
## Licensed under GNU GPL, version 2.
## To use eg, simply stick this file in your path. Then fire off an
## 'eg help' to get oriented. You may also be interested in
## http://www.gnome.org/~newren/eg/git-for-svn-users.html
@gtgt
gtgt / Memcache.php
Created September 11, 2017 10:09
Memcache class emulation by extending Memcached
<?php
if (!class_exists('Memcache') && class_exists('Memcached')) {
define('MEMCACHE_COMRESSED', 2);
/**
* Memcache class emulation by extending Memcached
*
* @author gt <gt-kani.hu>
* @class Memcache
*/
@gtgt
gtgt / build-php-static.sh
Last active March 6, 2024 04:51
Script to build static php
#!/bin/bash
U=${SUDO_USER:=${USER}}
if [[ -x `which realpath` ]]; then
T=$(realpath ${BASH_SOURCE[0]:=${0}})
else
T=${BASH_SOURCE[0]:=${0}}
fi
D=$(dirname ${T})
#apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libtidy-dev libmemcached-dev imagemagick-dev msgpack-dev
@gtgt
gtgt / symfony_dbg_switch.url
Last active April 4, 2017 11:29
/xxx <--> index_dbg.php/xxx switcher bookmarklet
javascript:window.location.replace(window.location.protocol+'//'+window.location.hostname+(window.location.pathname.indexOf('/index_dbg.php') >= 0 ? '' : '/index_dbg.php')+window.location.pathname.replace('/index_dbg.php','')+window.location.search+window.location.hash)
// ==UserScript==
// @name miui.hu anti-ad
// @namespace http://tampermonkey.net/
// @version 0.1
// @description I hate to force ads
// @author You
// @match http://miui.hu/*
// @grant none
// ==/UserScript==
onload_functions.shift();
@gtgt
gtgt / Whats the difference (if any)?
Created July 22, 2016 10:47
Warm-up questions for job seekers.
/* Case 1 */
<?php
header('Content-Type: text/css');
$exit_normally = 0;
register_shutdown_function(function() {
register_shutdown_function(function() {
global $exit_normally;
if (!$exit_normally) {
echo "/*\n".ob_get_clean()."\n*/\n";
}
#!/bin/sh
#
# git-subtree.sh: split/join git repositories in subdirectories of this one
#
# Copyright (C) 2009 Avery Pennarun <apenwarr@gmail.com>
# Copied from https://bitbucket.org/durdn/git/src/643f425beb30560b323a79a293282148c09da300/contrib/subtree/git-subtree.sh?at=np%2Fgit-subtree-list-4&fileviewer=file-view-default
#
if [ $# -eq 0 ]; then
set -- -h
fi
@gtgt
gtgt / README.md
Last active May 7, 2016 11:00
Orange PI LCD test