Skip to content

Instantly share code, notes, and snippets.

@da-n
da-n / gist:9998623
Created April 5, 2014 22:01
Rename a tag in git

Rename a git tag old to new:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.

-- source http://stackoverflow.com/a/5719854/695454

@pythoninthegrass
pythoninthegrass / README.md
Last active January 21, 2025 11:26
Ollama + Continue.dev VSCode settings

Ollama

Quickstart

# install ollama
brew install --cask ollama

# install continue.dev
code --install-extension Continue.continue
@kevincennis
kevincennis / v8.md
Last active January 21, 2025 11:26
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)
@markshust
markshust / alias-docker-compose.sh
Created April 19, 2017 19:57 — forked from maxclaus/alias-docker-compose.sh
Aliases for docker-compose
alias c='docker-compose'
alias cb='docker-compose build'
alias cup='docker-compose up'
alias cr='docker-compose run --service-ports --rm'
alias crl='docker-compose run --service-ports --rm local'
alias crd='docker-compose run --service-ports --rm develop'
alias crt='docker-compose run --rm test'
alias crp='docker-compose run --rm provision'
alias crci='docker-compose run --rm ci'
alias crwt='docker-compose run --rm watchtest'
@erikgall
erikgall / rsync.md
Last active January 21, 2025 11:20
Sync a local folder with a remote folder over SSH using rsync

The command -- rsync

rsync

rsync **source/** **destination
@VasanthVanan
VasanthVanan / nxc-auto.sh
Created October 10, 2024 18:49
Automation for NetExec / CrackMapExec
#!/bin/bash
# Check the number of arguments
if [ "$#" -ne 4 ]; then
echo "Usage: ./nxc-auto.sh [IP] [USER] [PASSWD] [DOMAIN]"
exit 1
fi
IP=$1
@sathishshan
sathishshan / youtube-dl.txt
Last active January 21, 2025 11:18
Download youtube private or member videos
#single video
youtube-dl --cookies youtube.com_cookies.txt "URL"
#playlist
youtube-dl --yes-playlist --cookies youtube.com_cookies.txt "URL"
You can use: --playlist-start, --playlist-end, --playlist-reverse or --playlist-items to achieve this goal.
#Note: cookie should be in Netscape format
@mndrix
mndrix / tips.md
Last active January 21, 2025 11:18
Prolog macros tips

Tips for writing macros in SWI Prolog. This should eventually be expanded into a full blog post:

Only expand macros when requested

For each module that defines a macro, define a predicate like:

wants_my_fancy_macro :-
    prolog_load_context(module, Module),
 Module \== my_module, % don't expand macros in our own code
@MrChocolatine
MrChocolatine / TS - More precise return type method Date#toISOString.d.ts
Last active January 21, 2025 11:14
TypeScript – How to accurately type dates in ISO 8601 format
// In TS, interfaces are "open" and can be extended
interface Date {
/**
* Give a more precise return type to the method `toISOString()`:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString
*/
toISOString(): TDateISO;
}
type TYear = `${number}${number}${number}${number}`;
@sivar2311
sivar2311 / platform-espressif32-versions.md
Last active January 21, 2025 11:14
platform-espressif32 versions

Arduino 3.x

Arduino 3.x is not officially suported by PlatformIO - see platformio/platform-espressif32#1225

Due to the lack of further development of the Espressif 32 Arduino Core for PlatformIO, the pioarduino fork was created.

Arduino 3.1.x

platform-espressif32 Arduino Core based on ESP-IDF platformio.ini