Skip to content

Instantly share code, notes, and snippets.

View brandonb927's full-sized avatar

Brandon Brown brandonb927

View GitHub Profile
View GoogleSheet : export links and texts separately from a rich text
@taniarascia
taniarascia / auth.md
Last active July 23, 2022 23:43
JavaScript Authentication & Authorization Book/Course
View auth.md

Authentication in Real-World Web Apps with JavaScript

Outline of ideas, concepts to cover, potential projects to write.

Setup Idea

  • Book with a video for each chapter.

Prerequisites/Overview

@mmaday
mmaday / s3-get.sh
Last active October 13, 2023 12:03 — forked from jpillora/s3get.sh
S3 signed GET in plain bash (Requires openssl and curl)
View s3-get.sh
#!/usr/bin/env bash
#
# Usage:
# s3-get.sh <bucket> <region> <source-file> <dest-path>
#
# Description:
# Retrieve a secured file from S3 using AWS signature 4.
# To run, this shell script depends on command-line curl and openssl
#
# References:
@premek
premek / mv.sh
Last active April 11, 2023 02:35
Rename files in linux / bash using mv command without typing the full name two times
View mv.sh
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@tpiros
tpiros / robbyrussell.zsh-theme
Created November 1, 2019 10:39
Adding emojis to ZSH theme
View robbyrussell.zsh-theme
# On a Mac: /Users/<username>/.oh-my-zsh/custom/themes
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
local emojis=("👋" "🤡" "🦄" "🤙" "🐼" "😊" "🔥" "⚡" "😎" "🌎")
local selectedEmoji=${emojis[$[1+($RANDOM%${#emojis[@]})]]}
local today=$(date +%m.%d)
# local ipCountry=`curl -s ip-api.com/json | python -c "import sys, json; print json.load(sys.stdin)['country']"`
# local country=$emoji_flags[${ipCountry}]
# }
case $today in
"01.01")
@webpro
webpro / 1_runner.js
Last active May 26, 2019 19:00
Minimal test runner that covers most of your needs
View 1_runner.js
const util = require('util');
const result = title => err => {
if (err instanceof Error) {
console.log(`✖ ${title}`);
console.error(err.actual || err);
} else {
console.log(`✔ ${title}`);
}
};
@crtr0
crtr0 / TypeText.js
Last active March 25, 2019 16:59
React component for typing out words (uses Hooks)
View TypeText.js
import { useState, useEffect } from 'react'
// wordList is expected to be an array
const TypeText = ({ wordList }) => {
const words = wordList
const [text, setText] = useState(null)
let wordIndex = 0
let typingIndex = 0
let timer
@NicholasBoll
NicholasBoll / addContext.js
Created December 16, 2018 08:34
Cypress mochawesome report. All files go into `cypress` directory
View addContext.js
const addContext = (report, screenshots, videoUrl) => {
const getTests = t => t.tests
const getSuites = t => t.suites
const addSuiteContext = (suite, previousTitles = []) => {
const titles = suite.title ? previousTitles.concat(suite.title) : previousTitles
getTests(suite).forEach(test => {
test.timedOut = false // for some reason this is dropped
const context = [
{
@bchecketts
bchecketts / placeFileInAllGithubRepos.php
Last active March 8, 2022 17:07
Quick script to place a single file in every repository in your Github organization
View placeFileInAllGithubRepos.php
<?php
## Generate a Github user token at https://github.com/settings/tokens
$githubToken = 'EnterYourGithubTokenHere';
## Your organization name (from https://github.com/yourOrganizationName)
$organization = 'yourOrganizationName';
## Enter the name of the remote file you want to place
$remoteFile = "pull_request_template.md";
View Samsung Smart-TV Blocklist Adlist (for PiHole)
# This is a blocklist to block samsung smart tv's sending meta data at home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
abtauthprd.samsungcloudsolution.com
acr0.samsungcloudsolution.com
ad.samsungadhub.com
ads.samsungads.com
amauthprd.samsungcloudsolution.com
api-hub.samsungyosemite.com