Skip to content

Instantly share code, notes, and snippets.

View apisandipas's full-sized avatar

Bryan Paronto apisandipas

View GitHub Profile
@apisandipas
apisandipas / Vagrant_Config.md
Created July 9, 2013 14:40
Base Vagrantfile.
  • Swap out box name: ruby | php | wordpress
  • Edit IP address, will auto-correct port usage
  • Modify synced_folder if not current dir ('./').
@apisandipas
apisandipas / Node & Grunt Setup
Created September 26, 2013 15:38
Dev Environment Set Up
Node/NPM:
1. Go to http://nodejs.org/ and download installer. This will give you node executable as well as NPM (Node Package Manager).
2. Run `node -v` and `npm -v` to install installation was successful
Grunt:
1. Run `npm install -g grunt-cli`
@apisandipas
apisandipas / typekit-weights-input.scss
Last active December 26, 2015 06:09
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.7)
// ----
/*
* Typekit Font Weights
*
* 100 = thin
* 200 = extra-light
@apisandipas
apisandipas / Gruntfile.js
Created October 29, 2013 13:44
Basic SCSS compiling / JS linting Gruntfile. `grunt` or `grunt watch` for development. `grunt build` will compress css ouput.
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
style: 'compressed'
},
files: {
@apisandipas
apisandipas / WPHelper.trait.php
Last active December 27, 2015 15:29
WordPress plugin development helper functions..
/**
* Determine if the current user has the relevant permissions
*
* @param $post_id
* @return bool
*/
private function canSaveData( $post_id ) {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
@apisandipas
apisandipas / sarcasm.js
Created December 9, 2013 19:31
sarcasm.js
/*
* sarcasm
* https://github.com/stayclassytally/sarcasm
*
* Copyright (c) 2013 Bryan Paronto
* Licensed under the MIT license.
*/
(function($) {
@apisandipas
apisandipas / _dashicons.scss
Last active January 23, 2023 14:18
Dashicons Mixin for Wordpress Admin
/**
* Dashicons SCSS Mixin for Custom Post Type Icons in WordPress 3.8+
*
* 1. In your CPT register_post_type function, set " 'menu_icon' => '', "
* 2. This will make the class for your admin icon .menu-icon-{slug for Custom Post Type name}
* 3. Load a compiled scss stylesheet at wp_head:
*
* function add_menu_icons_styles(){
* wp_enqueue_style( 'screen', get_template_directory_uri() . '/css/dashicons.css', array(), '0.1.0', 'all' );
* }
@apisandipas
apisandipas / index.html
Last active December 31, 2015 13:49
Basic HTML5 template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="css/screen.css"> -->
@apisandipas
apisandipas / _html_entities.scss
Created January 14, 2014 16:02
HTML Entities map - The pseudo-element 'content' property doesnt accept normal (&raquo;) style HTML entities. These variables below easy the pain of looking up the HEX codes...
/**
* The pseudo-element 'content' property doesnt accept normal (&raquo;) style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation
{
"auto_indent": true,
"caret_style": "smooth",
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"detect_indentation": true,
"fade_fold_buttons": true,
"fold_buttons": true,
"font_face": "Monaco",
"font_size": 15.0,
"gutter": true,