Skip to content

Instantly share code, notes, and snippets.

View wtfiwtz's full-sized avatar

Nigel Sheridan-Smith wtfiwtz

View GitHub Profile
# Copyright 2018 Marketplacer under the MIT license.
class CapybaraTimers
class << self
attr_accessor :nesting, :total_time
def setup
# Wrap every DSL method and every matcher with our timing function
Capybara::Session::DSL_METHODS.each do |name|
setup_timer_on_method(Capybara::DSL, name)
end
@msx752
msx752 / clientBinaries.json
Last active January 30, 2018 11:34
Temporary Ethereum Wallet Sync Bug Fix (29.01.2018)(Windows 10 x64 is tested)
{
"clients": {
"Geth": {
"version": "1.7.3",
"platforms": {
"linux": {
"x64": {
"download": {
"url": "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.7.3-4bb3c89d.tar.gz",
"type": "tar",
@shortjared
shortjared / list.txt
Last active April 11, 2025 14:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@its-a-feature
its-a-feature / Domain Enumeration Commands
Created January 7, 2018 21:03
Common Domain Enumeration commands in Windows, Mac, and LDAP
Domain: TEST.local
User Enumeration:
Windows:
net user
net user /domain
net user [username]
net user [username] /domain
wmic useraccount
Mac:
dscl . ls /Users
@DanHam
DanHam / SetupWinRM.ps1
Last active February 11, 2018 21:39
WinRM set up script for Packer. Used with Windows 2012R2 and Windows 2016.
# Configure WinRM settings
Write-Host 'Configuring WinRM'
# Make 100% sure we prevent Packer from connecting to WinRM while we
# attempt to configure everything
Disable-NetFirewallRule -DisplayGroup 'Windows Remote Management'
Write-Host '* Setting the WinRM Service start up type to Automatic'
Set-Service -Name WinRM -StartupType Automatic
@wolfeidau
wolfeidau / ecs-cluster-userdata.sh
Created September 11, 2017 01:57
cloudwatchlogs setup userdata script
#!/bin/bash -e
yum update -y
yum install -y aws-cfn-bootstrap git aws-cli
# Install the files and packages from the metadata
/opt/aws/bin/cfn-init -v --stack "{{ aws_stack_name }}" \
--resource ECSInstanceLaunchConfiguration \
--configsets ConfigCluster \
--region "{{ ref('AWS::Region') }}"
@sandor11
sandor11 / App.jsx
Last active September 10, 2018 12:49
using font-awesome with React, CSS Modules, Webpack 2 and Hot Module Reloading
import * as React from 'react';
import styles from './app.css';
import { fa, fa_question } from './icons';
console.log(fa);
const App = () => {
return (
<div>
<h1 className={styles.highlight}><span className={[fa, fa_question].join(' ')} /> React with font-awesome... like a boss!</h1>
</div>
POINTS = {
"A" => 1, "B" => 3, "C" => 3, "D" => 2,
"E" => 1, "F" => 4, "G" => 2, "H" => 4,
"I" => 1, "J" => 8, "K" => 5, "L" => 1,
"M" => 3, "N" => 1, "O" => 1, "P" => 3,
"Q" => 10, "R" => 1, "S" => 1, "T" => 1,
"U" => 1, "V" => 4, "W" => 4, "X" => 8,
"Y" => 4, "Z" => 10
}

A better git branch

I'll often use branches to try out experiments, ideas, and to separate different trains of thought. Not every branch gets merged – in fact, it's quite common for me to make several commits on a branch, look at the end result, and throw the branch away without ever merging it (branching is cheap and ideas are cheap, but bad code is expensive). As a result, I can end up with a lot of branches. This makes the output of git branch difficult to sort through:

$ git branch
* account-org-association
  acdx-blog-posts
  add-static-resource-support
  alter-component-naming