This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This canvas is only used for initial rendering and resampling | |
const imageCanvas = document.createElement('canvas') | |
imageCanvas.width = width | |
imageCanvas.height = height | |
// If we have constraints, resize/resample the provided image | |
if (constraints) { | |
// Get the percentage difference between the desired and actual dimensions | |
// We can calculate it based on width, since we a locked aspect | |
const percentageWidth = (width / constraints.width) * 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ = require 'underscore' | |
# My phone | |
dialpad = { | |
'1': [] | |
'2': ['a','b','c'] | |
'3': ['d','e','f'] | |
'4': ['g','h','i'] | |
'5': ['j','k','l'] | |
'6': ['m','n','o'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oh-my-zsh Customized Bureau Theme | |
### NVM | |
ZSH_THEME_NVM_PROMPT_PREFIX="(node-" | |
ZSH_THEME_NVM_PROMPT_SUFFIX=")" | |
### RVM | |
ZSH_THEME_RVM_PROMPT_PREFIX="(" | |
ZSH_THEME_RVM_PROMPT_SUFFIX="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cl_crosshairalpha 255 | |
cl_crosshairdot 0 | |
cl_crosshairgap -2 | |
cl_crosshairsize 2 | |
cl_crosshairstyle 4 | |
cl_crosshairusealpha 1 | |
cl_crosshairthickness .5 | |
cl_fixedcrosshairgap -1 | |
cl_crosshair_outlinethickness 1 | |
cl_crosshair_drawoutline 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { | |
PureComponent | |
} from 'react' | |
import PropTypes from 'prop-types' | |
import ReactAudioPlayer from 'react-audio-player' | |
export default class AudioAnalyser extends PureComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind "MWHEELUP" "cl_righthand 1" | |
bind "MWHEELDOWN" "cl_righthand 0" | |
bind "w" "+forward; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "s" "+back; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "a" "+moveleft; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "d" "+moveright; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "c" "+duck; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "SPACE" "+jump; toggle cl_crosshaircolor 1 2 3 4 5" | |
bind "MOUSE1" "+attack; toggle cl_crosshaircolor 1 2 3 4 5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text"/> | |
<xsl:template match="/">{ | |
<xsl:apply-templates select="*"/>} | |
</xsl:template> | |
<!-- Object or Element Property--> | |
<xsl:template match="*"> | |
"<xsl:value-of select="name()"/>" : <xsl:call-template name="Properties"/> | |
</xsl:template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PureComponent } from 'react' | |
import DefaultFallbackComponent from 'wherever' | |
export default (FallbackComponent = DefaultFallbackComponent) => { | |
return ComposedComponent => { | |
class ErrorBoundary extends PureComponent { | |
state: { | |
info: undefined, | |
error: undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go to sumologic, open the chrome dev tools, paste this into the console, and run it (press enter). | |
// This script will cycle through all of your open dashboards in the current tab every 5 mins. | |
(function() { | |
let tabIndex = 0; // Start at index 0 | |
const timeout = ((1000 * 60) * 5); // 5 min | |
setInterval(function () { // Start the timer | |
// Get whatever dashboard tabs are open at execution | |
const tabs = document.querySelectorAll('.tab-navigator__tab.tab-navigator__regular-tab._dashboard'); | |
| |
tabIndex++; // Increment the index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"additional_path_items": | |
[ | |
"/Users/sregester/.rvm/gems/ruby-2.1.6/bin/" | |
], | |
"auto_indent": true, | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, |