Skip to content

Instantly share code, notes, and snippets.

View j2deme's full-sized avatar

Jaime Jesús Delgado Meraz j2deme

  • TecNM Campus Ciudad Valles
  • Ciudad Valles, San Luis Potosi, México
  • 20:38 (UTC -06:00)
View GitHub Profile
@openback
openback / iso2wbfs
Created August 11, 2011 02:08
Uses Wiimms ISO Tool to convert one or more Wii ISO into a WBFS file, properly named for use on non-WBFS partitions
#!/bin/bash
#===============================================================================
#
# FILE: iso2wbfs
#
# USAGE: ./iso2wbfs [option] FILE... [wbfs directory]
#
# DESCRIPTION: Uses wit to convert one or more Wii ISO into a WBFS file
# properly named for use on non-WBFS partitions.
#
@greghelton
greghelton / cookbook.sql
Created January 1, 2012 06:41
MySQL Database for Cookbook, Recipes, Ingredients
-- start the server: $ mysqld --console
-- login: $ mysql -u root --password=wxyz
-- run the script: mysql> source /Users/javapro/dev/src/sql/Cookbook.sql
-- the script:
drop database if exists Cookbook;
create database Cookbook;
connect Cookbook;
@greghelton
greghelton / MovieEngagement.sql
Created January 1, 2012 21:42
MySQL Database for Movie Theater, Screens and Movies
create database MovieEngagement;
connect MovieEngagement;
create table Theater (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table Screen (
@greghelton
greghelton / ToySales.sql
Created May 7, 2012 03:06
ToySales MySQL Database
drop table if exists Sales;
drop table if exists SalesRep;
drop table if exists Product;
drop table if exists Category;
drop table if exists Manufacturer;
create table Manufacturer (
id INT NOT NULL AUTO_INCREMENT
, name VARCHAR(50)
, PRIMARY KEY (id)
) ENGINE=INNODB;
@sway
sway / commits-by-hour
Created July 11, 2012 20:25 — forked from bobuss/commits-by-hour
Git commits funstats
#!/usr/bin/env bash
for i in $(seq -f %02g 0 23); do echo $( echo -e "$i\t"; git shortlog -n --format='%ad %s' | grep " $i:" | wc -l); done
@bhgraham
bhgraham / marblemousefix.sh
Created November 12, 2012 18:03
marblemouse fix stupid scrolling/copy paste action
xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9
@MinecrafterJPN
MinecrafterJPN / BlockItemList.md
Last active February 1, 2019 12:47
Minecraft PE Block / Item List

Block List

ID => BlockName

		0 => "Air"
		1 => "Stone"
		2 => "Grass"
		3 => "Dirt"
		4 => "Cobblestone"

5 => "WoodenPlank"

@bosconian-dynamics
bosconian-dynamics / abbreviate.php
Last active March 2, 2020 04:45
PHP function to calculate an alphanumeric abbreviation for a string based on capitalization and length. Useful for generating semi-unique (but still human-interpretable) identifiers from things like class or plugin names.
<?php
/**
* PHP function to calculate an alphanumeric abbreviation for a string based on capitalization and
* length. Useful for generating semi-unique (but still human-interpretable) identifiers from things
* like class or plugin names.
*
* PHP version 5
*
* LICENSE: GPL v3 - Look it up!
*
@bryangreen
bryangreen / Inflector.php
Last active October 24, 2020 00:50
Twig Inflector Extension - For plural and singular English words
<?php
/**
* ReadySetData 2009-2013
* 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 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<?php
$email = isset( $_GET['email'] ) ? $_GET['email'] : 'null';
$salt = isset( $_GET['salt'] ) ? $_GET['salt'] : '';
// hash email, split it up
$hash = str_split( sha1( $email . $salt ), 2 );
// use first 3 values for foreground
$foreground = "{$hash[0]}{$hash[1]}{$hash[2]}";