Skip to content

Instantly share code, notes, and snippets.

View ticklemynausea's full-sized avatar
🫠
this is fine

Mário Carneiro ticklemynausea

🫠
this is fine
View GitHub Profile
@ticklemynausea
ticklemynausea / history.js
Created July 24, 2013 09:55
Navigation buttons and ajax navigation via history API
/*
* Browser State
*/
/*
* Pushes into the state stack. Elem is the element used to change the state, usually <a>
*/
function pushState(elem) {
var history = window.history;
if (history === undefined) {
@ticklemynausea
ticklemynausea / arvorezinha
Created October 2, 2013 11:59
Arvorezinha 2.0 em Oracle SQL
select * from (
select 'a'||lpad(level, 5,'0') as linha,
rpad(' ', &altura-level, ' ') || rpad('*', 2*level-1, '*') as arvorezinha
from dual
connect by level <= &altura
union
select 't'||lpad(level, 5,'0') as linha,
rpad(' ', ((2*&altura-1)/4)+1, ' ')||rpad('#', (2*&altura-1)/2, '#')
from dual
where mod(&altura, 2) = 0
<?
#
# Minecraftia! Item Drop Generator
# v1.0
#
require 'bootstrap.php';
use minecraftia\db\Bitch;
<?
#
# Minecraftia! Inquisitor json mapped 'org.bukkit.entity' remover
# v1.0
#
require 'bootstrap.php';
use minecraftia\db\Bitch;
@ticklemynausea
ticklemynausea / led1.py
Last active August 29, 2015 14:04
Rasberry Pi led test
import RPi.GPIO as GPIO
import time
import threading
import signal
import sys
import os
counter = 0
mode = 0
GPIO_num = [11, 12, 13, 15, 16]
mysql> select distinct table_schema, engine, table_name, table_rows from information_schema.tables where table_schema not in ('performance_schema', 'mysql', 'hlstats', 'information_schema') order by table_schema, table_rows desc;
+---------------------------+--------+-------------------------------------------------+------------+
| table_schema | engine | table_name | table_rows |
+---------------------------+--------+-------------------------------------------------+------------+
| esotalk | InnoDB | et_activity | 608 |
| esotalk | InnoDB | et_member_conversation | 539 |
| esotalk | MyISAM | et_post | 456 |
| esotalk | InnoDB | et_like | 234 |
| esotalk | InnoDB | et_member
# xAuth v2.4.4 Language File
# THIS HEADER IS USED AS A SIGNATURE. PLEASE DO NOT REMOVE.
join:
register: '{RED}Não estás registado.{NEWLINE}{RED} Por favor vai a http://www.minecraft.pt/register
e regista-te.'
login: '{RED}Faz login com o comando: /login <password>.{NEWLINE}{RED}Podes também
fazer login em http://www.minecraft.pt'
resume: '{BRIGHTGREEN}Bem-vindo de volta!'
non-premium: Non-premium user '{TARGET}' detected
error:
[01:01:50 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'l' in plugin xAuth v2.4.4
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) ~[spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) ~[spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at net.minecraft.server.v1_7_R4.PlayerConnection.handleCommand(PlayerConnection.java:1012) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:849) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at net.minecraft.server.v1_7_R4.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1573]
at net.minecraft.server.v1_7_R4.PacketPlayInChat.handle(PacketPlayIn
main:
auto-disable: true
check-premium: true
reload-on-join: true
check-for-updates: false
mysql:
enabled: true
host: localhost
port: 3306
user: minecraft
@ticklemynausea
ticklemynausea / led1.py
Last active December 4, 2016 08:31
raspberry pi led test - 7 led pattern toggled with tactile switch
import RPi.GPIO as GPIO
import time
import threading
import signal
import sys
import os
counter = 0
mode = 2
GPIO_num = [22, 18, 16, 15, 13, 12, 11]