Skip to content

Instantly share code, notes, and snippets.

View brayoh's full-sized avatar
🎯
Focusing

Brian Njenga brayoh

🎯
Focusing
View GitHub Profile
  1. Open terminal.
  2. Use any one of following to install youtube-dl (A downloader written in python).
    • Fire these 2 command if you have curl installed.
    sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl 
    sudo chmod a+rx /usr/local/bin/youtube-dl
    
    • Fire these 2 commands

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

@brayoh
brayoh / cognito.yml
Created January 13, 2022 16:58 — forked from chris/cognito.yml
Cognito user pool setup for Serverless (as CloudFormation resource)
#
# Cognito user pool/auth setup
#
Resources:
MyAppUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: myapp_user_pool
UsernameAttributes: # use email as username/login
- 'email'
@brayoh
brayoh / ThinkAboutMonads.md
Created January 10, 2020 05:46 — forked from cscalfani/ThinkAboutMonads.md
How to think about monads

How to think about Monads

Initially, Monads are the biggest, scariest thing about Functional Programming and especially Haskell. I've used monads for quite some time now, but I didn't have a very good model for what they really are. I read Philip Wadler's paper Monads for functional programming and I still didnt quite see the pattern.

It wasn't until I read the blog post You Could Have Invented Monads! (And Maybe You Already Have.) that I started to see things more clearly.

This is a distillation of those works and most likely an oversimplification in an attempt to make things easier to understand. Nuance can come later. What we need when first learning something is a simple, if inaccurate, model.

This document assumes a beginner's knowledge of pure functional programming and Haskell with some brief encounters of Monads, e.g. [Functors, Applicatives, And

@brayoh
brayoh / serverless.yml
Created October 21, 2019 08:51 — forked from codecitizen/serverless.yml
A serverless.yml file configuring a AWS ElastiCache redis instance that is accessible by all AWS Lambda functions deployed by this serverless function.
service: my-service
provider:
name: aws
runtime: nodejs8.10
stage: ${opt:stage, 'dev'}
environment:
REDIS_HOST:
"Fn::GetAtt": [ElasticCacheCluster, RedisEndpoint.Address]
functions:
@brayoh
brayoh / introrx.md
Created April 12, 2018 13:15 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@brayoh
brayoh / tmux-cheatsheet.markdown
Created December 1, 2016 09:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@brayoh
brayoh / meta-tags.md
Created May 28, 2016 06:08 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@brayoh
brayoh / gist:ff3759a2ce41601569d1a826d2441b9d
Created May 4, 2016 12:23 — forked from jesusprubio/gist:8f092af4ca252e252eab
Proposal: A Node.js penetration test framework

Proposal: Node.js penetration test framework

Hi guys! Since I started to write Bluebox-ng I've been tracking the different security projects I found written in Node.js. Now we've published the first stable version we think it's the right moment to speak among us (and, of course, everyone interested in it :).

Why?

  • I think we're rewriting the same stuff in our respective projects again and again. For example, almost any tool supports IPv6 because the functions we need are still not present in the Node core and the libraries I found (IMHO) were not enough.
  • There're different projects implementing exactly the same thing, ie: port scanners.
  • We're working in a too new environment, so we need to make it together.
@brayoh
brayoh / install_php7_lamp.sh
Created April 27, 2016 09:50 — forked from barbotkin/install_php7_lamp.sh
Install php7 in Linux (Mint/Ubuntu) LAMP Server
#! /bin/bash
# PHP 7 Initial Compile (Install php7 Linux (Mint/Ubuntu) LAMP) ##
# Author: Roman Barbotkin
# Fixed error and simplified, I tested for Linux Mint 7.3.
# Install: just run this file, it will do everything for you :)
# If make error uncoments 2 line.
#sudo apt-get purge make
#sudo apt-get install make
@brayoh
brayoh / Sublime Text 3 Build 3103 License Key - CRACK
Created April 27, 2016 08:56
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04