Skip to content

Instantly share code, notes, and snippets.

View datatypevoid's full-sized avatar

Null Void datatypevoid

View GitHub Profile

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@datatypevoid
datatypevoid / README.md
Created April 26, 2016 22:21 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@datatypevoid
datatypevoid / controllers.js
Created July 3, 2016 00:06 — forked from 3dd13/controllers.js
Testing ngCordova geolocation watchPosition and getCurrentPosition function
.controller('DashCtrl', function($scope, $ionicPlatform, $cordovaGeolocation) {
var watch;
var watchOptions = {
timeout : 5000,
maximumAge: 3000,
enableHighAccuracy: true // may cause errors if true
};
var pollCurrentLocation = function() {
$cordovaGeolocation.getCurrentPosition(watchOptions)
@datatypevoid
datatypevoid / IonicCordovaNetwork.js
Created July 3, 2016 00:07 — forked from welcoMattic/IonicCordovaNetwork.js
Async navigator.connection.type service for Ionic Framework
var myApp = angular.module('myApp').service('CordovaNetwork', ['$ionicPlatform', '$q', function($ionicPlatform, $q) {
// Get Cordova's global Connection object or emulate a smilar one
var Connection = window.Connection || {
"CELL" : "cellular",
"CELL_2G" : "2g",
"CELL_3G" : "3g",
"CELL_4G" : "4g",
"ETHERNET" : "ethernet",
"NONE" : "none",
"UNKNOWN" : "unknown",
@datatypevoid
datatypevoid / .zshrc
Created November 1, 2016 21:46
powerlevel9k configuration
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S} \UE12E %D{%d/%m/%Y} \uE868"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=('os_icon' 'todo' 'context' 'dir' 'vcs')
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=('status' 'node_version' 'time')
POWERLEVEL9K_SHOW_CHANGESET=true
POWERLEVEL9K_CHANGESET_HASH_LENGTH=6
POWERLEVEL9K_RAM_ELEMENTS=(ram_free)
@datatypevoid
datatypevoid / tmux-cheatsheet.markdown
Created November 4, 2016 05:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@datatypevoid
datatypevoid / npm-upgrade-bleeding.sh
Created November 21, 2016 11:15 — forked from othiym23/npm-upgrade-bleeding.sh
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@datatypevoid
datatypevoid / uninstall-razer-synapse.sh
Created November 29, 2016 13:45 — forked from timotgl/uninstall-razer-synapse.sh
How to fully uninstall Razer Synapse on OS X El Capitan without using Razer's official uninstall tool
# How to uninstall Razer Synapse ( http://www.razerzone.com/synapse/ )
# on OS X El Capitan without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater
launchctl remove com.razerzone.rzdeviceengine
sudo rm /Library/LaunchAgents/com.razer.rzupdater.plist
sudo rm /Library/LaunchAgents/com.razerzone.rzdeviceengine.plist
@datatypevoid
datatypevoid / os_name.lua
Created January 7, 2017 14:42 — forked from soulik/os_name.lua
OS type and CPU architecture detection in Lua language
local function getOS()
local raw_os_name, raw_arch_name = '', ''
-- LuaJIT shortcut
if jit and jit.os and jit.arch then
raw_os_name = jit.os
raw_arch_name = jit.arch
else
-- is popen supported?
local popen_status, popen_result = pcall(io.popen, "")
@datatypevoid
datatypevoid / safe_reference.cpp
Created January 23, 2017 21:51 — forked from eliasdaler/safe_reference.cpp
Safe reference implementation. C++ part. See https://eliasdaler.github.io/game-object-references for details
#include <sol.hpp>
#include <string>
#include <iostream>
using EntityId = int;
class Entity {
public:
explicit Entity(EntityId id) :
name("John"), id(id)