Skip to content

Instantly share code, notes, and snippets.

View briandemant's full-sized avatar
💭
is happy coding

Brian Demant briandemant

💭
is happy coding
View GitHub Profile
<!doctype html>
<html ng-app="Demo" ng-controller="AppController">
<head>
<meta charset="utf-8" />
<title>
Cross-Fading Images With AngularJS
</title>
<style type="text/css">
$ cat test.js
function foo () { while (true) { } }
function bar () { return foo(); }
bar();
$ node test.js &
$ gdb attach $(pidof node)
0x00000bf778c63d5f in ?? ()
(gdb) b v8::internal::Runtime_StackGuard
Breakpoint 1 at 0x84a1f0
(gdb) print 'v8::V8::TerminateExecution'(0)
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
var dom = Bloop.dom;
var Box = Bloop.createClass({
getInitialState: function() {
return { number: 0 };
},
updateNumber: function() {
this.state.number++;
},
@briandemant
briandemant / fake_sendmail.sh
Last active September 5, 2016 07:59 — forked from xianhuazhou/gist:1415626
a fake sendmail script for testing mail related applications, can replace /usr/sbin/sendmail
#!/bin/sh
# Source : https://github.com/Sanchiz/fake_sendmail.sh
prefix="/home/USERNAME/sendmail/new"
numPath="/home/USERNAME/sendmail"
if [ ! -f $numPath/email_numbers ]; then
echo "0" > $numPath/email_numbers
fi

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@briandemant
briandemant / slack-dark-mode.sh
Created February 8, 2019 06:45 — forked from mmrko/slack-dark-mode.sh
Dark Mode for Slack (macOS)
#!/usr/bin/env bash
# Homebaked Slack Dark Mode. After executing this script, hit refresh (⌘ + R) or restart Slack for changes to take effect.
# Adopted from https://gist.github.com/a7madgamal/c2ce04dde8520f426005e5ed28da8608
SLACK_RESOURCES_DIR="/Applications/Slack.app/Contents/Resources"
SLACK_SSB_INTEROP_FILEPATH="$SLACK_RESOURCES_DIR/app.asar.unpacked/src/static/ssb-interop.js"
THEME_FILEPATH="$SLACK_RESOURCES_DIR/dark-theme.css"
curl -o "$THEME_FILEPATH" "https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css"