Skip to content

Instantly share code, notes, and snippets.

Raphael Essoo-Snowdon realph

View GitHub Profile
@realph
realph / await.js
Last active Mar 2, 2017
Await Example
View await.js
/* Github Profile Fetcher */
async function fetchProfile(u) {
const res = await fetch(`https://api.github.com/users/${u}`);
// 1. Check user exists
if (!res) {
alert('User does not exist!');
return;
}
View gist:7be76766247d24c8024f
(function() {
'use strict';
var angular = require('angular');
angular.module('zeroApp', [])
.controller('MainController', ['$scope', function($scope) {
$scope.message = "Hello Angular!";
}]);
@realph
realph / js-task.js
Last active Aug 29, 2015
Gulp Zero Tasks
View js-task.js
gulp.task('js', function () {
// define our sole entry point (source file)
return browserify({entries: ['./src/js/app.js']})
// bundle our js
.bundle()
// create a vinyl object
.pipe(source('app.js'))
// convert vinyl file to buffer
.pipe(buffer())
// create our source maps
@realph
realph / SassMeister-input-HTML.html
Last active Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<a class="button-pri">Primary Button</a>
<a class="button-sec">Secondary Button</a>
@realph
realph / SassMeister-input-HTML.html
Created Jan 8, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<a class="button-pri">Primary Button</a>
<a class="button-sec">Secondary Button</a>
@realph
realph / SassMeister-input-HTML.html
Created Jan 8, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<a class="button-pri">Primary Button</a>
<a class="button-sec">Primary Button</a>
@realph
realph / shopify-css-import.md
Last active Aug 29, 2015
Adding CSS @import to theme development using Grunt and Gulp
View shopify-css-import.md

Navigate to the root of your theme in Terminal.

1. Installing grunt globally

npm install -g grunt-cli

I ended up preceding this with sudo to get it working.

2. Move Gemfile, Gruntfile.js and package.json to your theme's root

@realph
realph / dealing-with-local-wordpress-permission-levels
Created Nov 12, 2013
Give WordPress directories a permission level of 775 and files a permission level of 664. Stolen from the great Pontus Abrahamsson over on WP Stack Exchange. http://wordpress.stackexchange.com/questions/57166/ftp-credentials-on-localhost
View dealing-with-local-wordpress-permission-levels
cd /wherever/sites/the-site
sudo chown -R _www wordpress-folder
sudo chmod -R g+w wordpress-folder
View .gitignore
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
You can’t perform that action at this time.