Skip to content

Instantly share code, notes, and snippets.

View drewlustro's full-sized avatar
💭
on windoze

Drew Lustro drewlustro

💭
on windoze
View GitHub Profile
codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need
@FermiDirak
FermiDirak / reactathon2020.js
Created November 30, 2020 12:13
Learn static code analysis in React!
import jscodeshift from "jscodeshift";
import fs from "fs";
import path from "path";
const projectDirectory = "my/project/root/directory";
///////////////////////////////////////////////////////////////////////////////
// util functions
///////////////////////////////////////////////////////////////////////////////
@thevangelist
thevangelist / my-component.spec.js
Created August 4, 2016 13:06
The only React.js component test you'll ever need (Enzyme + Chai)
import React from 'react';
import { shallow } from 'enzyme';
import MyComponent from '../src/my-component';
const wrapper = shallow(<MyComponent/>);
describe('(Component) MyComponent', () => {
it('renders without exploding', () => {
expect(wrapper).to.have.length(1);
});
@mdp
mdp / cleanup.sh
Created September 30, 2011 23:36
Git branch cleanup
# This must be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
git branch --merged master | grep -v 'master$' | xargs git branch -d
# Show remote fully merged branches
echo "The following remote branches are fully merged and will be removed:"
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$'
@gerardroche
gerardroche / sublime-clean
Last active December 17, 2022 06:15
Clean Sublime Text caches and optionally clean out any sessions
#!/bin/sh
set -e
unset CDPATH
unset IFS
show_usage() {
cat <<USAGE
Usage: [PROJECTS_PATH=<PATH>] $(basename "$0") [--exclude-sessions] [--exclude-workspaces]
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@neilmendoza
neilmendoza / gist:4512992
Last active June 9, 2023 14:22
Function to return matrix for rotation about an arbitrary axis in GLSL.
mat4 rotationMatrix(vec3 axis, float angle)
{
axis = normalize(axis);
float s = sin(angle);
float c = cos(angle);
float oc = 1.0 - c;
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0,
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0,
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0,
@kyleturner
kyleturner / Remove Submodule
Created January 5, 2012 01:07
How to remove a submodule from a Github project
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
@onedayitwillmake
onedayitwillmake / gist:3288507
Created August 7, 2012 19:12
Rotating in GLSL
// Simple Lambertian lighting
// Mario Gonzalez
//
// Based on 'WebGL - A Beginners Guide'
attribute vec3 aVertexPosition;
attribute vec3 aVertexNormal;
uniform vec3 rotation;
uniform mat4 uMVMatrix;
@ronjouch
ronjouch / ronj-autohotkey.ahk
Created April 20, 2012 13:28
Collection of AutoHotkey scripts I use
; Variables definition
; -----------------------------------------------------------------------------
EnvGet, userProfile, USERPROFILE
Software := userProfile . "\Dropbox\software\"
; Launch or toggle program, http://lifehacker.com/5468862/create-a-shortcut-key-for-restoring-a-specific-window
; -----------------------------------------------------------------------------
ToggleWinMinimize(WindowTitle)
{
SetTitleMatchMode,2