Skip to content

Instantly share code, notes, and snippets.

View realdubb's full-sized avatar
💚
200

Alex Wachira realdubb

💚
200
View GitHub Profile
@realdubb
realdubb / create_pr.sh
Created September 14, 2024 01:26 — forked from slavingia/create_pr.sh
Create a (draft) pull request using GitHub CLI
#!/bin/bash
# Create a (draft) pull request using GitHub CLI.
# It assigns the PR to the current user, fills in the title from the first commit,
# and uses the PR template file for the description.
set -euo pipefail
# Colors for output
RED='\033[0;31m'

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.

Considerations

😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

@realdubb
realdubb / clean-up-boot-partition-ubuntu.md
Created August 7, 2020 05:31 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@realdubb
realdubb / mongodb.md
Last active June 1, 2018 21:35
mongodb queries

Using database with hyphen

db = db.getSiblingDB("dbname-w-hyphen")
db.dropUser("admin")

Get user

use db
@realdubb
realdubb / docker-cheatsheet.md
Last active November 28, 2019 04:21
docker cheatsheet

Show images

docker image ls

Remove image

docker image rm <id>

Show all containers

docker ps -a

Build image from Dockerfile within application directory

@realdubb
realdubb / ssh-key.md
Created April 4, 2018 20:50
Configuring ssh keys in new server

Source

Step One—Create the RSA Key Pair

The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):

ssh-keygen -t rsa

Step Two—Store the Keys and Passphrase

Follow prompts

@realdubb
realdubb / config
Created April 4, 2018 20:47
.ssh/config example
Host server1
HostName server1.cyberciti.biz
User nixcraft
Port 4242
IdentityFile /nfs/shared/users/nixcraft/keys/server1/id_rsa
@realdubb
realdubb / hotkeys.ahk
Created March 29, 2018 13:56
Map keys for Pause and Mute actions
PgUp::Send {Media_Play_Pause}
ScrollLock::Send {Volume_Mute}
@realdubb
realdubb / add-timestamps.sql
Created March 16, 2018 16:40 — forked from bdcravens/add-timestamps.sql
SQL Server - add createdAt and updatedAt columns, automatically updates
ALTER TABLE myTable
add createdAt datetime
CONSTRAINT DF_myTable_createdat DEFAULT GETDATE()
ALTER TABLE myTable
add updatedAt datetime
CONSTRAINT DF_myTable_updatedAt DEFAULT GETDATE()
go

How do I get the data type of each field from a table?

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_NAME = 'Table-Name'