Skip to content

Instantly share code, notes, and snippets.

@dayne
dayne / dots-readme.md
Created June 20, 2022 23:12
$HOME as GIT

Managing your home's dot files as git repo an approach well documented by @durdn.

initial setup

git init --bare $HOME/.cfg
alias cfg='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
cfg config --local status.showUntrackedFiles no
echo ".cfg" >> .gitignore
@jordansinger
jordansinger / LockScreen.swift
Created May 11, 2020 23:24
Let’s recreate the iPhone lock screen using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
ScrollView {
VStack {
Text("5:45").font(.system(size: 64, weight: .thin))
Text("Monday, May 11").font(.system(size: 24))
}.padding(.vertical, 32)
@MattPD
MattPD / analysis.draft.md
Last active November 12, 2024 06:46
Program Analysis Resources (WIP draft)
@bradtraversy
bradtraversy / mysql_cheat_sheet.md
Last active November 26, 2024 13:50
MySQL Cheat Sheet

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@dayne
dayne / 0_autossh_on_reboot.md
Last active March 22, 2023 03:13
autossh on reboot

A script (that needs some work) that documents for me how to setup and launch an autossh session to a cloud server. Not really useful for others.

Server Setup

If you want to setup your own server though the steps are: Create the remote cloud server autossh account (Only need to do this once)

useradd -m -s /bin/false autossh
mkdir ~autossh/.ssh && chmod 700 ~autossh/.ssh
touch ~autossh/.ssh/authorized_keys && chmod 600 ~autossh/.ssh/authorized_keys
chown -R autossh.autossh ~autossh/.ssh
@dayne
dayne / 0-ssh-agent_checker_launcher.md
Last active September 28, 2024 05:38
ssh-agent checker/launcher

ssh-agent checker/launcher

About

A bash script for managing ssh-agent that I use for Ubuntu and OSX.

Started as a variation from this classic on Stack Overflow How to check if ssh-agent is already running and then adapted it to align with behaivor I want.

This version does the following:

  • checks for ssh agent forward (remote login) and if so does not setup ssh-agent or any keys
@mubix
mubix / infosec_newbie.md
Last active November 7, 2024 19:11
How to start in Infosec
@leonardofed
leonardofed / README.md
Last active November 26, 2024 10:13
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@robulouski
robulouski / gmail_imap_example.py
Last active April 19, 2024 02:27
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib