Skip to content

Instantly share code, notes, and snippets.

View hullen's full-sized avatar
coffee & learn & code

Hullen Gonzales hullen

coffee & learn & code
View GitHub Profile
@wycks
wycks / htaccess cache and stuff
Last active March 26, 2022 20:48
Boilerplate .htaccess from Paul Irish with WordPress added
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@bob-sims
bob-sims / 00-readme.md
Created September 24, 2012 21:53
Staff Directory demo app for Appcelerator #TiMob training

#Overview

I created this simple Staff Directory App as a demonstration for a small internal staff training workshop. Finished product shown below, goal throughout class was to explain code walkthrough and learning resources in pieces, allowing students to create app as a practical exercise.

..

My goals:

  • Show utility of Titanium Mobile to rapidly create simple, x-platform, enterprisey apps (clever term via @thiswayup)
  • Demonstrate use of app template (Master/Detail) included as part of Ti Studio.
@lipelopeslage
lipelopeslage / parallax-secret.js
Created November 21, 2012 18:30
My parallax secret
/*########################################################################*/
/*###### using jQuery selector for a fast/cross-browser resolution #######*/
/*########################################################################*/
var totalAreas = 6, // this value is obviously arbitrary
winH = $(window).height, // the window height
top = $(window).scrollTop(), // the current scroll value
maxScroll = $(document).height() - winH, // the maximum scroll value
scrollPerc = top/maxScroll, // the current scroll percentage
areaPercent = 0; // init variable
@sl4m
sl4m / gist:5091803
Created March 5, 2013 16:57 — forked from trcarden/gist:3295935
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@tonysm
tonysm / Post.php
Created March 6, 2013 17:12
blog tutorial
<?php
/**
*
*/
class Post extends AppModel
{
public $validate = array(
'title' => array(
'rule' => 'notEmpty'
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@carldanley
carldanley / wp-modules.js
Last active December 22, 2015 00:28
Example of WP modules object
// new modules object introduction
( function( window, undefined ) {
window.wp = window.wp || {};
window.wp.modules = window.wp.modules || {};
} )( window );
// example Mediator module
wp.modules.Mediator = ( function( window, undefined ) {
@olivierlacan
olivierlacan / DebugKiller.sublime-settings
Last active December 22, 2015 21:19
My Debug Killer (Sublime Text plugin available on Package Control) configuration to catch console.log statements and debugger statements in either JavaScript or CoffeeScript.
{
"patterns": [
{
"pattern": "(console\\.log\\(.*?\\))",
"scopes": [
"storage.type.function.js",
"meta.function.json.js",
"source.js"
]
},
@netojoaobatista
netojoaobatista / api-and-ood.md
Created September 23, 2013 16:29
A API e o Design de Software Orientado a Objetos

A API e o Design de Software Orientado a Objetos

Quando falamos sobre design em orientação a objetos, estamos basicamente falando sobre responsabilidade e relacionamento. Com responsabilidade quero dizer algo que alguma coisa faz e com relacionamento quero dizer como alguma coisa utiliza aquilo que outra coisa faz. O Design de Software Orientado a Objetos trata especificamente da forma com que os objetos se relacionam, ou seja, como expor a responsabilidade dos objetos de forma que outros objetos possam se relacionar.

Do ponto de vista do Design de Software Orientado a Objetos, não importa, exatamente, como alguma coisa é feita. Pelo contrário, o objetivo é justamente evitar esse conhecimento sobre a implementação, encapsulando o que é específico para permitir que trabalhemos com a definição conceitual daquilo que precisamos utilizar. Por exemplo, é comum uma aplicação precisar trabalhar com um SGBD. Se nossos objetos tiverem conhecimento específico de que estamos, na verdade, trabalhando com MySQL, e