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
/* eslint-disable no-console */ | |
import { useEffect } from 'react'; | |
type ShouldLog = (name: string) => boolean; | |
type Stats = { | |
readonly name: string; | |
count: number; | |
previousState?: unknown; | |
}; |
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
function clone-repo() { | |
local GIT_HOME=$HOME/git | |
local GITHUB_REPO_URL=$1 | |
if [[ $GITHUB_REPO_URL == git@* ]]; then | |
ORG=${GITHUB_REPO_URL#*:} | |
ORG=${ORG%/*} | |
elif [[ $GITHUB_REPO_URL == https://* ]]; then | |
ORG=${GITHUB_REPO_URL%/*} | |
ORG=${ORG##*/} |
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
# install openvpn network manager | |
# `network-manager-openvpn-gnome` is required for password management + interation with keyring | |
sudo apt install network-manager network-manager-openvpn network-manager-openvpn-gnome | |
# import .ovpn file into network manager | |
nmcli connection import type openvpn file <PATH-TO-OVPN-FILE> | |
# set username | |
nmcli connection modify openvpn-connection +vpn.data username=<USERNAME> | |
# set password | |
nmcli connection modify openvpn-connection +vpn.secrets password=<PASSWORD> |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
#!/bin/sh | |
# heavily inspired by http://wildlyinaccurate.com/deploying-a-git-repository-to-a-remote-server (and comments) | |
ref=master # git ref | |
prefix=deploy_in_prog/ # just a temp name | |
tmp_dir=/tmp | |
remote_dir=/var/www # the remote directory | |
remote_host=user@host # the remote host |
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
<div ng-app="myApp" ng-controller="myController"> | |
<div my-clicky my-click-action="doStuff(number)"></div> | |
</div> |
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
<div ng-app="myApp" ng-controller="myController"> | |
<div my-clicky my-click-action="doStuff()"></div> | |
</div> |
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
<?php | |
# Simple loop copy | |
function loop_copy($array) { | |
$object = new stdClass(); | |
foreach ($array as $key => $value) { | |
$object->$key = $value; | |
} | |
} |
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
function dateInLocalTimezone(simpleDateString) { | |
var date = new Date(simpleDateString), millis = date.getTime(); | |
date.setTime(millis + date.getTimezoneOffset() * 60 * 1000); | |
return date; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" /> | |
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" /> | |
</head> | |
<body style="padding: 60px 0;"> | |
<div style="float:right;"> | |
<a class="btn tt" title="Yaaaaaaaaaaay, this longer tooltip works.. kinda">:)</a> | |
<a class="btn tt" title="Boooooooooooo, this longer tooltip is broken..">:(</a> |