Skip to content

Instantly share code, notes, and snippets.

View Mygod's full-sized avatar
👿
Payment is usually required for a response.

Mygod Mygod

👿
Payment is usually required for a response.
View GitHub Profile
@Mygod
Mygod / gist:8898722
Created February 9, 2014 13:00
Goomod Downloader
/* Here's the script that I used to fetch ALL the goomods from goofans.com. Enjoy. *
* Copyleft © 2014 Mygod (studio.mygod.tk) */
using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;
using System.Windows.Forms;
using System.Xml.Linq;
using System.Text.RegularExpressions;
@Mygod
Mygod / gist:9599562
Created March 17, 2014 13:53
AC Automaton (C++ implementation)
#include <iostream>
#include <map>
using namespace std;
namespace Mygod
{
class ACAutomaton
{
private:
@Mygod
Mygod / gist:9823348
Created March 28, 2014 01:45
STL Definitions
#define general_methods(container) \
explicit container ({[size_type n, {const value_type& val = value_type()}, {charT c}]}, \
{const key_compare& comp = key_compare()}, \
const allocator_type& alloc = allocator_type()); \
template <class InputIterator> \
container (InputIterator first, InputIterator last, {const key_compare& comp = key_compare()}, \
const allocator_type& alloc = allocator_type()); \
container (const container& x); \
container& operator= (const container& x); \
@Mygod
Mygod / gist:f4143a78e0b10ab9ac3a
Created August 11, 2014 09:33
PHP + PostgreSQL Lightweighted Caching
<?
$connection_string = '*insert connection string here*';
$cache_id = 123;
$expiration_seconds = 86400;
function generate_a_huge_string() {
sleep(5);
return 'An awesome string has been generated!';
}
@Mygod
Mygod / gist:cdf412dd1020551454be
Created August 14, 2014 13:07
Chinese characters fix for Windows English systems.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"MS PGothic MC"=hex(7):4D,00,53,00,59,00,48,00,2E,00,54,00,54,00,43,00,2C,00,4D,00,69,00,63,00,72,00,6F,00,73,00,6F,00,66,00,74,00,20,00,59,00,61,00,48,00,65,00,69,00,20,00,55,00,49,00,2C,00,31,00,32,00,38,00,2C,00,38,00,35,00,00,00,43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,65,00,68,00,6f,00,6d,00,65,00,5c,00,57,00,54,00,56,00,47,00,4f,00,54,00,48,00,49,00,43,00,2d,00,53,00,2e,00,74,00,74,00,63,00,2c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,54,00,56,00,20,00,50,00,47,00,6f,00,74,00,68,00,69,00,63,00,00,00,4d,00,49,00,4e,00,47,00,4c,00,49,00,55,00,2e,00,54,00,54,00,43,00,2c,00,50,00,4d,00,69,00,6e,00,67,00,4c,00,69,00,55,00,00,00,53,00,49,00,4d,00,53,00,55,00,4e,00,2e,00,54,00,54,00,43,00,2c,00,53,00,69,00,6d,00,53,00,75,00,6e,00,00,00,47,00,55,00,4c,00,49,00,4d,00,2e,00,54,00,54,00,43,00,2c,00,47,00,75,00,6c,00,69,00,6d,00,00,00,00,00
"Segoe Media Center
@Mygod
Mygod / gist:cd6efc1524d3f1662b25
Last active August 29, 2015 14:07
A buggy WordPress exporter (it's buggy, don't use it)
(s = document.createElement('script')).setAttribute('src', 'https://mygod.tk/js/jquery/jquery-2.0.3.min.js');
document.getElementsByTagName('head')[0].appendChild(s);
(s = document.createElement('script')).setAttribute('src', 'https://rawgithub.com/eligrey/FileSaver.js/master/FileSaver.js');
document.getElementsByTagName('head')[0].appendChild(s);
output = [];
itemCount = [];
processedCount = [];
count = (q = $('a[href^="*wordpress*/?p="]')).length;
processed = 0;
@Mygod
Mygod / gist:7abc15491f2c2df2694a
Last active August 29, 2015 14:07
Update patch generator for customized Drupal, WordPress, etc.
git checkout main-old
git checkout -b main-new
: extract new content here...
git commit -a -m main-new
git checkout -b mine-new
git merge mine-old
git diff mine-old --name-only > patch-files.txt
: If this is the first one, use this:
: git ls-tree --full-tree -r --name-only HEAD > patch-files.txt
7zG a patch.zip @patch-files.txt -mx9
@Mygod
Mygod / README.md
Last active August 29, 2015 14:13
DjVu bookmarks exporter
@Mygod
Mygod / converter.php
Last active April 21, 2019 03:17
Redirect user to Userscloud free account download link
<form method="POST" action="https://userscloud.com/<?= $id ?>">
<input type="hidden" name="op" value="download2">
<input type="hidden" name="id" value="<?= $id ?>">
<input type="hidden" name="method_premium" value="">
</form>
<iframe src="https://userscloud.com/?op=login&login=solarglacier&password=coolpass" width="0" height="0" style="display: none;" onload="document.getElementsByTagName('form')[0].submit();"></iframe>
@Mygod
Mygod / games.md
Last active June 24, 2017 06:50
Games I love
  • Antichamber
  • Aquaria
  • Braid
  • Epistory - Typing Chronicles
  • FEZ
  • Goat Simulator
  • Indie Game: The Movie
  • Inside
  • LIMBO
  • NightSky HD