Skip to content

Instantly share code, notes, and snippets.

View andrefcdias's full-sized avatar
:fishsticks:
fishsticks

André Dias andrefcdias

:fishsticks:
fishsticks
  • Berlin, Germany
  • 05:30 (UTC +02:00)
View GitHub Profile
@stigok
stigok / githook.js
Last active July 8, 2024 14:56
Verify GitHub webhook signature header in Node.js
/*
* Verify GitHub webhook signature header in Node.js
* Written by stigok and others (see gist link for contributor comments)
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428
* Licensed CC0 1.0 Universal
*/
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('body-parser')
@magicknot
magicknot / mac-setup.sh
Last active March 12, 2022 16:50
Load zshrc after installing it
#!/bin/sh
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing oh my zsh..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
echo "ZSH_DISABLE_COMPFIX=true\n$(cat ~/.zshrc)" > ~/.zshrc
source ~/.zshrc
@kimadeline
kimadeline / sparkles.zsh-theme
Last active June 24, 2022 19:04
✨ Magical zsh theme ✨
if [[ -z $ZSH_THEME_SPARKLES_PREFIX ]]; then
ZSH_THEME_SPARKLES_PREFIX='✿'
fi
CURRENT_USER_="%{$FG[171]%}%n%{$reset_color%}"
PROMPT='%{$FG[220]%}☆。・:*:・゚⭑ $CURRENT_USER_ %{$FG[069]%}$ZSH_THEME_SPARKLES_PREFIX %{$FG[217]%}%c %{$FG[147]%}$(git_prompt_info)%{$FG[147]%}%{$FG[220]%}⭑ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$FG[076]%}[%{$FG[159]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
@mislav
mislav / windows-on-mac.md
Last active February 21, 2024 23:38
Install Windows 11 in a virtual machine on macOS with an M1 CPU

Based on https://docs.getutm.app/guides/windows/

  1. You will need:
    • A Windows 10 or Windows 11 license key;
    • UTM for Mac - the App Store version is offered as a way to support the developers, since it's paid, but has the same features as the free build.
  2. Obtain scripts that bootstrap an arm64 Windows 11 22H2 (I've chosen Windows Home edition and not Pro);
  3. brew install aria2 cabextract wimlib cdrtools minacle/chntpw/chntpw;
  4. cd into the directory extracted in step 1 and bash uup_download_macos.sh - this will produce an ISO;
  5. In the UTM app, create a new “Virtualize” machine and mount the ISO file from the previous step;
  6. Check “Install drivers and SPICE tools”;