Skip to content

Instantly share code, notes, and snippets.

View superhero's full-sized avatar
💭
oɹǝɥɹǝdns

Erik Landvall superhero

💭
oɹǝɥɹǝdns
View GitHub Profile
@superhero
superhero / shift.log.js
Last active August 29, 2015 13:57
Shift.Log
Shift.Log = function()
{
this.router =
{
'error.*': 'error'
};
this.view =
{
error: function(e)
@superhero
superhero / mysql-cheat-sheet.sql.md
Last active March 10, 2018 09:38
MySQL cheat sheet

Select

CSV file

SELECT * FROM `tbl`
INTO OUTFILE '/tmp/out.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
@superhero
superhero / charset-converter.php
Last active April 23, 2024 06:14
UTF-8 Encoding Debugging
<?php
$search = array(
'á',
'ä',
'Ä',
'ç',
'é',
'É',
sudo apt-get install make
sudo apt-get install php5
sudo apt-get install php5-dev
sudo apt-get install php-pear
sudo apt-get install libyaml-dev
sudo pecl install yaml-1.1.0
<!DOCTYPE html>
<html dir="ltr" lang="sv-SE">
<head>
<title>Flipper</title>
<meta charset="utf-8">
<style>
.thumb
{
@superhero
superhero / shift.event-attacher.js
Last active December 20, 2015 01:59
This is a module for the shift framework that allows interaction between the view layer of the DOM to trigger events in the framework.jQuery dependent..
Shift.EventAttacher = function(sl)
{
this.router =
{
'shift.ready' : 'attachEvents',
'attach-events': 'attachEvents'
};
this.view =
{