Skip to content

Instantly share code, notes, and snippets.

@julienma
julienma / README.md
Last active July 27, 2024 10:48
GitHub Actions: using SSH keys to auto-deploy with dokku-push

The dokku-push action requires an SSH key with push access to the Dokku instance. Here's how to do that.

Replace APPNAME with the name of the app (e.g. this is a good idea to use the same name used on Dokku's).

Generate a new SSH keypair

We want each repo to have its own SSH key, so it's easier to rotate/invalidate them if required, without affecting all the repos. Let's generate a new key on your computer (see GitHub help):

@akash-gajjar
akash-gajjar / tldv.py
Last active July 27, 2024 10:45
Download videos from TLDV.io
from datetime import datetime
from os import system
import requests
import json
## Please install ffmpeg before running this script and make sure it's in your PATH
## brew install ffmpeg
## Please install requests before running this script
## pip3 install requests
@sjimenez44
sjimenez44 / TimeZone.md
Created September 8, 2021 19:19
Change time zone Docker container

Change TimeZone in Docker containers

With Docker Engine

The timezone of a container can be set using an environment variable in the docker container when it is created. For example:

$ docker run ubuntu:latest date
Sat Feb 27 15:58:32 UTC 2021
$ docker run -e TZ=America/Bogota ubuntu:latest date
Sat Feb 27 15:58:40 Asia 2021
#!/usr/bin/env bash
# Script to quickly and easily create non-meterpreter payloads for the OSCP
# @m8sec
# Note: It is recommeneded to create a new directory before running this
# script. All payloads will be placed in the current directory
IP="127.0.0.1" # <YOUR IP HERE>
PORT=443 # You may have to change this if there are outbound restrictions on the target ;)
#!/usr/bin/env bash
# Author: m8r0wn
# Description: Uses the Linux net commands to lookup a user in Active Directory
# This is the Linux equivalent of: net user [Username] /domain
# Usage: ./aduser_lookup.sh [username] [password] [DC-Server] [Lookup-User]
if [ ! $1 ];
then
printf "[-] Usage: $0 Username Password DC_Server username_to_lookup\n"
@nandorojo
nandorojo / knew.md
Last active July 27, 2024 10:40
What I wish I knew when I started with Expo Web, React Navigation & Next.js

I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.

Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.

It's gotten to the point where I find my own answers from 6 months before on certain Github issues.

I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.

I have made libraries to address a number of the topics here, from navigation to design.

@noahwilliamsson
noahwilliamsson / apple-vdm-get-actions-list.md
Last active July 27, 2024 10:37
Apple USB-PD VDM get-actions-list
Model / port 0x101 0x103 0x105 0x106 0x201 0x203 0x206 0x208 0x301 0x303 0x304 0x306 0x30a 0x502 0x606 0x702 0x803 0x809 0xb11 0x4606
MacBookAir10,1 (MBA’20) LR N/A 0x8000 0x8000 N/A N/A N/A 0x187 0x20c 0x318 0x8001 N/A 0x
@roommen
roommen / Hybrid (Windows+Linux) Docker Swarm
Last active July 27, 2024 10:34
Hybrid (Windows+Linux) Docker Swarm
**********************
*** Pre-requisites ***
**********************
1. Set up Windows 2016 password:
gcloud beta compute --project <project_id> reset-windows-password <instance_name> --zone <zone_name>
ip_address: <ip_address>
password: <defult_password_generated>
username: <username>
3. Installing Docker:
# I've always disliked the "./configure" incantation - it's right here! I
# shouldn't need to tell the shell where to look for it. But of course,
# putting '.' in your $PATH is terrible -- it's insecure and throws permission
# errors if you try to 'execute' regular files. Bash 4's `shopt -s autocd`
# solves half the problem; and the ability to override
# command_not_found_handle() solves the other.
#
# This is an OS X-oriented script that attempts to do the most intelligent
# thing possible when you enter the name of a file in your $PWD into the bash
# prompt. It will: