Skip to content

Instantly share code, notes, and snippets.

View jimmynotjim's full-sized avatar
☀️
Enjoying SoCal "Fall"

Jimmy Wilson jimmynotjim

☀️
Enjoying SoCal "Fall"
View GitHub Profile
@wilmoore
wilmoore / Gruntfile.small.coffee
Last active December 28, 2015 02:09
Modular Gruntfile Examples
module.exports = (grunt) ->
####################################################
# diagnostic
####################################################
# use if `--time` is present
require('time-grunt')(grunt) if grunt.option 'time'
####################################################
@mkivikoski
mkivikoski / ideal-employment.md
Last active September 20, 2016 14:36
A checklist of the qualities you'd like to see your next company have.

We write resumes to convince employers to hire us. What if we created a list for what we were looking for in our next employer and their environment?

This allows both sides to cut through the game of telephone, establish what you are looking for in your role, and define the type of organization you're looking to work for. Fork, modify and add this checklist to your portfolio site to quicken the pace of getting through companies that don't match your criteria.

--

@germanny
germanny / fn-page-custom-fields-monetization.php
Last active July 4, 2017 01:46
Custom Meta Box to Toggle Monetization
<?php // https://gist.github.com/3950382
function toggle_monetization() {
global $post;
$custom = get_post_custom($post->ID);
if(isset($custom["toggle_monetization"][0])) {
$money = $custom["toggle_monetization"][0];
}
?>
<p style="margin-bottom:10px;">
@ericrasch
ericrasch / TypeKit embed code.php
Last active July 4, 2017 03:54
Different methods for loading TypeKit's embed code.
<?php
/**
* TypeKit's default embed code.
* Source: http://help.typekit.com/customer/portal/articles/649336-embed-code
* Avg. Load Time: 191ms; 198ms; 265ms
*/
?>
<script type="text/javascript" src="//use.typekit.net/xxxxxxx.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
@Abban
Abban / is-old-android.php
Created October 23, 2012 16:09
PHP Function to check Android version from the user agent.
/**
* Is Old Android
*
* Check to see it the user agent is Android and if so then
* check the version number to see if it is lower than 4.0.0
* or passed parameter
*
* @param string $version
* @return boolean
*/
@marcamos
marcamos / Gruntfile.js
Last active January 16, 2018 19:51
Learning Grunt by writing a verbose Gruntfile that replaces (and, goes beyond) what we're used to with CodeKit.
module.exports = function(grunt) {
"use strict";
// -------------------------------------------------------------------------
// #### Load plugins as needed ####
// Using a 'just in time' approach -- meaning: only load plugins when they
// are needed -- this will automatically find, then load, any and all
// plugins that are needed by the task currently being executed. It will
// scan the devDependencies object, in package.json, and match any of the
// selectorSupported lovingly lifted from the mad italian genius, diego perini
// http://javascript.nwbox.com/CSSSupport/
function selectorSupported(selector){
var support, link, sheet, doc = document,
root = doc.documentElement,
head = root.getElementsByTagName('head')[0],
impl = doc.implementation || {
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't be busy with technology
- a medium is not a grande
- break convention for your users
@ericrasch
ericrasch / first-paragraph-class.php
Created March 29, 2012 21:26
WordPress: Add Class to first Paragraph in WordPress the_content; (add this to the functions.php in your Theme)
<?php
/* =BEGIN: Add Class to first Paragraph in WordPress the_content();
Source: http://webdevbits.com/wordpress/add-class-to-first-paragraph-in-wordpress-the_content/
---------------------------------------------------------------------------------------------------- */
function first_paragraph($content){
// Testing to see if the content is a Page or Custom Post Type of school, if so, display the text normally (without the class = intro).
if ( is_page() || ('school' == get_post_type() ) ) {
return preg_replace('/<p([^>]+)?>/', '<p$1>', $content, 1);
} else {
return preg_replace('/<p([^>]+)?>/', '<p$1 class="intro">', $content, 1);
@ascott1
ascott1 / tinfoil.md
Last active February 25, 2019 13:31
The levels of internet privacy

These are some steps that users can take to retain privacy online. These aren't perfect, but aim to strike a balance between privacy and usability.

Level 1

  • Enable Do Not Track in your browser
  • Use a tracker blocking plugin such as Privacy Badger or Ghostery
  • Disable third-party cookies
  • Use the HTTPS Everywhere browser extension