Skip to content

Instantly share code, notes, and snippets.

View zot24's full-sized avatar
🦑
boom!

zot24

🦑
boom!
View GitHub Profile
@hesido
hesido / coingecko.js
Last active November 13, 2023 23:15
Coingecko Add On for Google Spreadsheets
/**
* Returns Market Value From Coingecko api
* Function accepts ranges as well, please use it to reduce server lookups, so it fetches data only once.
* Update: 17.02.2020
*
* @param {string} symbol pair (required)
* @param {string} Default Value Missing Data (optional)
* @return {number} ticker price
* @customfunction
**/
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active May 2, 2024 11:04
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@tp7309
tp7309 / auth_adb.bat
Last active November 18, 2022 09:58
fix adb unauthorized issue
chcp 65001
@echo fix adb unauthorized issue, can only fix one PC, run it in recovery mode
@echo 用于修复nexus6p不能连接adb的问题,在recovery模式下运行此脚本。
set currentDir=%~dp0
@echo add local fastboot to PATH variable
@set PATH=%currentDir%lib\platform-tools;%PATH%
adb devices 2>nul | findstr /r /c:"recovery" || @echo "error : device not in recovery mode" && pause && exit /B 1
@echo off
@sarthology
sarthology / Darth-Setting.json
Created August 15, 2018 07:11
Custom Profile for iTerm settings
{
"Badge Text" : "",
"Custom Directory" : "No",
"Working Directory" : "\/Users\/sarthaksharma",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 1,
"Blue Component" : 1,
"Red Component" : 1
},
@schmich
schmich / ducky.md
Last active April 5, 2024 14:20
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@onnimonni
onnimonni / s3.tf
Created March 13, 2017 10:03
s3 replicated bucket with terraform
# Create all variables used in this Terraform run
variable "aws_access_key" {}
variable "aws_access_secret_key" {}
variable "aws_bucket_name" {}
variable "aws_region_main" {
default = "eu-west-1"
}
variable "aws_region_replica" {
default = "eu-central-1"
}
@kitwalker12
kitwalker12 / migrate-redis.py
Created March 4, 2017 00:11 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@shashankmehta
shashankmehta / setup.md
Last active January 7, 2024 11:57
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@thehar
thehar / slack_leave_channels_mass.rb
Created February 2, 2017 19:16
Remove yourself from Slack channels en-masse
#
# Slack hack:: slack_leave_channels_mass
# Description:: Remove yourself from IM-channels in mass
require "slack"
require "progress_bar"
class Array
include ProgressBar::WithProgress
end