Skip to content

Instantly share code, notes, and snippets.

View Quezler's full-sized avatar
🍪
crater desires cookies.

Patrick 'Quezler' Mounier Quezler

🍪
crater desires cookies.
  • Netherlands
  • 15:07 (UTC +02:00)
View GitHub Profile
@bepcyc
bepcyc / pom.xml
Created January 30, 2012 13:08
maven plugin to run shell or batch scripts
<!--source: http://stackoverflow.com/a/3493919/918211-->
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution><!-- Run our version calculation script -->
<id>Version Calculation</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
@mranney
mranney / emoji_sad.txt
Created January 30, 2012 23:05
Why we can't process Emoji anymore
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@nirenjan
nirenjan / bishop.c
Created January 4, 2013 06:34
Simulate a drunken bishop walk to produce OpenSSL random art.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define XLIM 17
#define YLIM 9
#define ARSZ (XLIM * YLIM)
#define DEBUG 0
(function() {
// NOTE: I have intentionally avoided the use of jQuery in
// the next two functions so as not to obscure any details.
// Updates the DOM in such a way that layout is constantly
// computed and thrown away.
var UpdateThrash = function(data) {
// Get all the labels
var spans = document.querySelectorAll('.item .lab');
@ircmaxell
ircmaxell / equality.php
Last active April 19, 2019 13:52
Unicode Set Functions
<?php
const ✓ = true;
const ✕ = false;
function ≠($left, $right) {
return $left != $right;
}
function ≅($left, $right) {
vim.o.background = "light"
vim.o.termguicolors = true
if vim.g.colors_name then vim.cmd("hi clear") end
vim.cmd("syntax reset")
vim.g.colors_name = "Boring Tomorrow"
-- Default GUI Colours
@tonykwon
tonykwon / gist:8910261
Created February 10, 2014 04:13
MySQL - Row size too large - BLOB prefix of 768 bytes is stored inline
-- Error Message: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
--
-- our table name that has this issue is XYZ
--
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_per_table=ON;
ALTER TABLE XYZ ROW_FORMAT=COMPRESSED;
@chrisveness
chrisveness / utf8-regex.js
Last active May 25, 2023 01:53
Utf8 string encode/decode using regular expressions
/**
* Encodes multi-byte Unicode string into utf-8 multiple single-byte characters
* (BMP / basic multilingual plane only).
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
*
* Can be achieved in JavaScript by unescape(encodeURIComponent(str)),
* but this approach may be useful in other languages.
*
* @param {string} unicodeString - Unicode string to be encoded as UTF-8.
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.