Skip to content

Instantly share code, notes, and snippets.

View leobauza's full-sized avatar

Leo leobauza

View GitHub Profile
@leobauza
leobauza / socialhandlers.js
Last active August 29, 2015 14:01
Popups for Twitter or Facebook
App.social = (function () {
var tweet = '.share ul li:first-child a',
fbook = '.share ul li:nth-child(2) a',
pin = '.share ul li:last-child a';
function openIntent(url, w, h) {
the_window = window.open(url, '', 'width=' + w + ',height=' + h)
the_window.focus();
}
@leobauza
leobauza / .jshintrc
Last active August 29, 2015 14:05
roughly a good .jshintrc file (excessive trickiness disallowed)
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
@leobauza
leobauza / sharer.php
Last active August 29, 2015 14:05
This goes with socialhandlers.js
<?php
$f_share_url = get_permalink();
$tweet_via = "PoettersBetter";
$tweet_text = get_the_title();
?>
<nav class="nav--share">
<ul>
<li class="title">Share</li>
<li class="fbook"><a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5burl%5d=<?php echo urlencode($f_share_url); ?>">facebook</a></li>
@leobauza
leobauza / .bashrc
Last active April 2, 2016 19:53
.bashrc
# ht: http://natelandau.com/my-mac-osx-bash_profile/
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
@leobauza
leobauza / .bash_profile
Last active August 29, 2015 14:18
.bash_profile
#copyright 2003, mike-devlin.com - sample .bash_profile edited for Oracle install
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
@leobauza
leobauza / keymap.cson
Created April 15, 2015 13:12
atom keymap to fix some emmet problems
# Your keymap
#
# Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
# to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
# Here's an example taken from Atom's built-in keymap:
@leobauza
leobauza / config.cson
Created April 15, 2015 13:12
atom config.cson
"*":
editor:
fontSize: 14
lineHeight: 1.6
showInvisibles: true
showIndentGuide: true
autoIndentOnPaste: false
invisibles: {}
core:
themes: [
@leobauza
leobauza / Vagrantfile
Last active May 27, 2016 13:43
Vagrantfile for scotchbox
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "scotch/box"
config.vm.network "private_network", ip: "192.168.33.10"
#config.vm.network "public_network", ip: "192.168.33.10"
config.vm.hostname = "scotchbox"
config.vm.synced_folder "../../Sites", "/var/www", type: "nfs"
@leobauza
leobauza / zero.info
Created April 18, 2016 13:42
Info file for Zero theme
name = Zero
description = Zero out Drupal.
core = 7.x
regions[content] = Content
regions[help] = Help
regions[page_top] = Page Top
regions[page_bottom] = Page Bottom
regions[highlighted] = Highlighted
regions[sidebar_first] = Sidebar First
regions[sidebar_second] = Sidebar Second
@leobauza
leobauza / zero_css_alter.php
Created April 18, 2016 14:15
CSS Alter for Zero Theme
<?php
/**
* Implements hook_css_alter().
*/
function zero_css_alter(&$css) {
$exclude = array(
'modules/system/system.base.css' => FALSE,
'modules/system/system.messages.css' => FALSE,
'modules/system/system.theme.css' => FALSE,
'modules/system/system.menus.css' => FALSE,