Skip to content

Instantly share code, notes, and snippets.

View manfromanotherland's full-sized avatar
🤏

Edmundo Santos manfromanotherland

🤏
View GitHub Profile
@manfromanotherland
manfromanotherland / idiomatic.css
Last active August 29, 2015 14:03
CSS: Guidelines for good CSS, heavily based on idiomatic.css.
/* ==========================================================================
Section comment block
========================================================================== */
/* Sub-section comment block
========================================================================== */
/**
* Short description using Doxygen-style comment format
*
@manfromanotherland
manfromanotherland / looping.html
Created June 28, 2014 02:52
HTML; JavaScript: Loop infinito para sacanear os amiguinhos; Apenas uma linha de HTML.
<!doctype html><title>Looping…</title><script>window.history.go(0);</script>
@manfromanotherland
manfromanotherland / test-connection.php
Created July 3, 2014 18:35
PHP: How to test connection to database #snippet
<?php
$mysqli = @new mysqli('host', 'user', 'password', 'dabatase');
if ($mysqli->connect_errno) {
die('Connect Error: ' . $mysqli->connect_errno);
}
echo "Connected successfully"
?>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
# Set architecture flags
export ARCHFLAGS="-arch x86_64"
# Ensure user-installed binaries take precedence
export PATH=/usr/local/bin:$PATH
export PATH="/usr/local/mysql/bin:$PATH"
export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:$PATH"
# Load .bashrc if it exists
test -f ~/.bashrc && source ~/.bashrc
@manfromanotherland
manfromanotherland / select.css
Last active August 29, 2015 14:15
CSS: Custom select #snippet
.select {
position: relative;
overflow: hidden;
width: 100%;
}
.select select {
width: 130%;
padding: .4em .8em;
border: none;
@manfromanotherland
manfromanotherland / learning-python.md
Last active August 29, 2015 14:15
Learning Python: resources
@manfromanotherland
manfromanotherland / css-default-values.css
Last active October 14, 2018 09:01
CSS: properties default/initial values
/* Sources:
* http://reference.sitepoint.com/css
* http://developer.mozilla.org/en/CSS
* https://github.com/peteboere/css-crush/blob/master/misc/initial-values.ini */
.default-values {
animation : none;
animation-delay : 0;
animation-direction : normal;
animation-duration : 0;
@manfromanotherland
manfromanotherland / regex-search.sql
Last active August 29, 2015 14:16
SQL: Regex search #snippet
-- SEARCH FOR EMPTY STRING
-- REGEX RECIPES: http://regexr.com/
SELECT column_name
FROM table_name
WHERE (
column_name
REGEXP '^$'
)