Skip to content

Instantly share code, notes, and snippets.

View db's full-sized avatar
💻
I may be slow to respond.

Dean Burge db

💻
I may be slow to respond.
  • Gold Coast, Australia
View GitHub Profile
@db
db / package.json
Created November 10, 2023 02:11
resly job
{
"name": "resly",
"version": "1.0.0",
"main": "submitResume.js",
"type": "module",
"scripts": {
"test": "jest"
},
"keywords": [],
"author": "",
@db
db / upinator.ps1
Created September 27, 2017 12:50
Start AppPool that has stopped
Import-Module WebAdministration
set-Location IIS:\AppPools
$AppPools = dir
foreach ($AppPool in $AppPools)
{
Write-Host "$AppPool.Name -> checking"
if($AppPool.state -ne "Started")
{
Write-Host "- $AppPool.Name found stopped - starting it"
Start-WebAppPool -Name $AppPool.Name

Keybase proof

I hereby claim:

  • I am db on github.
  • I am deanburge (https://keybase.io/deanburge) on keybase.
  • I have a public key ASAKqLVU07P23MBnACj_E8uajxjrGZsQql8J51Kq6k4WEQo

To claim this, I am signing this object:

@db
db / _debug.css
Last active March 10, 2017 02:49
Foundation 5 Grid Debugger
.row > *:not(.columns) {
outline: 1px solid #c00;
}
.row > *:not(.columns):after {
color: white;
font: bold 13px arial;
background: #c00;
padding: 3px;
content: "grid: row child has no columns";
}
@db
db / getPercentageOfElementAreaViewable.js
Created June 10, 2016 03:04
getPercentageOfElementAreaViewable
function getPercentageOfElementAreaViewable(el) {
var viewport = { width: window.innerWidth, height: window.innerHeight };
var rect = el.getBoundingClientRect();
var area = rect.width * rect.height;
var visibleHeight = rect.height;
var visibleWidth = rect.width;
// deduct amount out of viewport at top
if (rect.top < 0) visibleHeight += rect.top;
@db
db / bulletproof-npm-workflow.md
Last active January 20, 2017 03:15
Bulletproof NPM Workflow

Bulletproof NPM Workflow

Use the Bulletproof Git Workflow, and before code review:

pre-release package

Publish a pre-release version of the package:

@db
db / bulletproof-git-workflow.md
Last active January 11, 2024 06:05
bulletproof git workflow

Bulletproof Git Workflow

start working

git checkout master
git pull
git checkout -b feature/my-work
# edit your files
@db
db / load-more-command-pattern.js
Last active August 29, 2015 14:05
load more command pattern
// ----------------------------------------------------------------------------- command
define('command', ['underscore', 'backbone'], function(_, Backbone) {
var Command = function() {};
Command.prototype = _.extend({}, Backbone.Event, {
ALWAYS: 'always.command',
DONE: 'done.command',
@db
db / FloatUtil.hx
Created May 11, 2012 03:41
HaXe Float Precision
class FloatUtil
{
public static function fixedFloat(v:Float, ?precision:Int = 2):Float
{
return Math.round( v * Math.pow(10, precision) ) / Math.pow(10, precision);
}
}
@db
db / safeConsole.js
Last active September 25, 2015 23:08
Safe console
(function safeConsole() {
if (typeof window.console == "undefined") { window.console = {}; }
for (var methods = "log,warn,error,info,dir".split(","), safe=function(){}, method; method=methods.pop();) {
window.console[method] = window.console[method] || safe;
}
})();