Skip to content

Instantly share code, notes, and snippets.

View d33pfri3d's full-sized avatar
🏠
Working from home

Shaun D d33pfri3d

🏠
Working from home
View GitHub Profile
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@ngokevin
ngokevin / gist:719ed8d2a475e23694ef8725cce563a9
Created January 31, 2017 12:56
A-Frame Text Editor Plugin Spec
// If you're interested in developing text editor or IDE plugins for A-Frame, here are the A-Frame specific pieces.
1. Syntax highlighting of A-Frame's ECS syntax, which is the same as inline CSS styles.
2. Support autocompletion of component names. This includes core components like geometry, material, obj-model, light, position, rotation, scale. These can be programatically populated from `AFRAME.components`. But, we can also include community components from the Registry (e.g., physics, particle systems, mountains, animations). We can populate from these JSON files https://github.com/aframevr/aframe-registry/blob/master/build/0.4.0.json based on the A-Frame version. If a community component is selected, then inject the script tag into the <head>.
3. Support for autocompletion of component property names. Typing `material="` would expose a dropdown component properties color, roughness, src, envMap, displacementMap, etc. See https://aframe.io/docs/0.4.0/components/material.html#properties-1 for all the m
@adamreisnz
adamreisnz / package.json
Last active August 22, 2024 10:12
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",
@geuis
geuis / gist:1489bbd1a8e47e86db38
Last active April 9, 2017 08:38
Force jshint validation with pre-commit hook (bash)
#!/bin/sh
# Run changed javascript files through jshint before commiting and prevent bad
# code from being committed.
# If you need to prevent newly added js from being checked because its in a
# library like bower_components, add a .jshintignore file and list the directory
# INSTALL: Add as a file in your repo as .git/hooks/pre-commit
FILES=$(git diff --cached --name-only --diff-filter=ACM| grep ".js$")
if [ "$FILES" = "" ]; then
exit 0
@maleeb
maleeb / fileservice.js
Last active October 16, 2016 01:03
AngularJS file service for ionic (org.apache.cordova.file)
//Filesystem (checkDir, createDir, checkFile, creatFile, removeFile, writeFile, readeFile)
.factory('FileService', function($q) {
return {
checkDir: function (dir) {
var deferred = $q.defer();
getFilesystem().then(
function(filesystem) {
filesystem.root.getDirectory(dir, {create: false},
@toolmantim
toolmantim / Makefile
Last active August 21, 2024 20:56
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@jendiamond
jendiamond / gist:6128723
Last active April 11, 2024 11:35
Creating your own Gem & Command Line Interface Using Bundler

Presentation slides

Create a Gem - Make it a CLI - Add Rspec Tests

Create a Gem - Make it a Command Line Interface - Add Rspec Tests Using Bundler & Thor

#Creating your own Gem

  1. Run this command in your Terminal. This creates and names all the files you need for your gem. We are going to create a Lorem Ipsum Generator; you can call it whatever you want but seeing as we are creating a Lorem Ipsum generator we'll call it lorem. Read about gem naming conventions.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active September 21, 2024 08:58
A badass list of frontend development resources I collected over time.