Skip to content

Instantly share code, notes, and snippets.

View adelowo's full-sized avatar

Lanre Adelowo adelowo

View GitHub Profile
@adelowo
adelowo / envelope_encryption.go
Created July 21, 2021 13:41 — forked from andreas/envelope_encryption.go
Envelope Encryption with Amazon KMS and Go
package main
import (
"bytes"
"crypto/rand"
"encoding/gob"
"fmt"
"io/ioutil"
"os"
"time"
@adelowo
adelowo / delete-likes-from-twitter.md
Created June 26, 2020 17:18 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@adelowo
adelowo / script.sh
Created June 26, 2020 00:06 — forked from sergeycherepanov/script.sh
shallow update not allowed
Here's what I ended up doing - it worked perfectly. Note that I was moving from my old host (Bitbucket) to my new one (Gitlab). My comments are above the commands:
# First, shallow-clone the old repo to the depth we want to keep
git clone --depth=50 https://...@bitbucket.org/....git
# Go into the directory of the clone
cd clonedrepo
# Once in the clone's repo directory, remove the old origin
git remote remove origin
@adelowo
adelowo / git-http-proto.txt
Created January 8, 2019 16:57 — forked from schacon/git-http-proto.txt
Git HTTP transport protocol documentation
HTTP transfer protocols
=======================
Git supports two HTTP based transfer protocols. A "dumb" protocol
which requires only a standard HTTP server on the server end of the
connection, and a "smart" protocol which requires a Git aware CGI
(or server module). This document describes both protocols.
As a design feature smart clients can automatically upgrade "dumb"
protocol URLs to smart URLs. This permits all users to have the
@adelowo
adelowo / web-servers.md
Created November 19, 2018 22:11 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@adelowo
adelowo / Dockerfile
Last active October 16, 2018 22:14
Golang with module support and an extremely tiny Docker image that wouldn't stress you as "Scratch" would
FROM golang:1.11 as build-env
WORKDIR /go/src/github.com/adelowo/project-with-go-mod
ADD . /go/src/github.com/adelowo/project-with-go-mod
ENV GO111MODULE=on
RUN go mod download
RUN go mod verify
RUN go install ./cmd
@adelowo
adelowo / go-missing-examples.md
Created August 2, 2018 10:57 — forked from andrestc/go-missing-examples.md
Go std lib funcs/methods missing examples

About this

This list has the goal of helping developers interested in contributing to the Go language but are unsure of where to start. This was not generated manually so some functions and methods here may not require examples (maybe because they are too simple, e.g .String()) and some of these may only make sense in a package level example (which are not considered for this list yet). Use your best judgment and check the documentation before you open up a CL to add an example.

You should also search in gerrit for open CLs that are already adding examples.

I will try to keep this list as up to date as possible. If you find any mistakes, please comment below and I will try to fix it.

@adelowo
adelowo / 1_kubernetes_on_macOS.md
Created June 11, 2018 10:23 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

Keybase proof

I hereby claim:

  • I am adelowo on github.
  • I am lanreadelowo (https://keybase.io/lanreadelowo) on keybase.
  • I have a public key ASDdfblT8r393nFDW4h6wstD7UJOSwJJGXJ7cfOT5pGNHQo

To claim this, I am signing this object:

@adelowo
adelowo / PluginInterface.php
Created January 4, 2017 04:12
Proposed Interface for gbowo library
<?php
namespace Gbowo\Contract\Plugin;
use Gbowo\Contract\Adapter\AdapterInterface;
interface PluginInterface
{
public function getPluginAccessor() : string;