Skip to content

Instantly share code, notes, and snippets.

View shakahl's full-sized avatar
:electron:

Soma Szelpal shakahl

:electron:
View GitHub Profile
@shakahl
shakahl / emojis.sh
Created March 27, 2024 20:56 — forked from BuonOmo/emojis.sh
A list of all UTF-8 emojis in bash or zsh
# Obtained with the code written in next file
emoji_grinning_face=😀
emoji_grinning_face_with_big_eyes=😃
emoji_grinning_face_with_smiling_eyes=😄
emoji_beaming_face_with_smiling_eyes=😁
emoji_grinning_squinting_face=😆
emoji_grinning_face_with_sweat=😅
emoji_rolling_on_the_floor_laughing=🤣
emoji_face_with_tears_of_joy=😂
emoji_slightly_smiling_face=🙂
@ryanrudolfoba
ryanrudolfoba / SteamOS-Recovery-Downloader-and-Flasher.sh
Created January 9, 2024 21:04
Script for SteamOS to easily download and flash the latest SteamOS Recovery Image to a USB device
#!/bin/bash
# SteamOS Recovery Downloader and Flasher
# script by ryanrudolf
# https://github.com/ryanrudolfoba
# https://youtube.com/@10minutesteamdeckgamer
#
# script will create the directory - ~/SteamOS-Recovery-Downloader and automatically download the latest SteamOS Recovery Image.
# script will perform a md5 check to make sure that download is not corrupted and finally flash the image to the USB device.
# if there are multiple USB devices, the script will exit immediately. Plug in a single USB device that you want to flash and re-run the script.
#
@shakahl
shakahl / download-github-private-asset.ps1
Created October 25, 2023 04:51 — forked from sonibla/download-github-private-asset.ps1
Download assets from private Github releases using PowerShell
$credentials="<github_access_token>"
$repo = "<user_or_org>/<repo_name>"
$file = "<name_of_asset_file>"
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "token $credentials")
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$id = ((Invoke-WebRequest $releases -Headers $headers | ConvertFrom-Json)[0].assets | where { $_.name -eq $file })[0].id
@Bill-Stewart
Bill-Stewart / Get-Message.ps1
Last active May 14, 2024 15:40
Get-Message.ps1
# Get-Message.ps1
# Written by Bill Stewart (bstewart AT iname.com)
# Version history:
#
# 0.1.0 (2023-07-11)
# * Initial version.
#
# 1.0.0 (2024-05-14)
# * Improved: MessageId parameter now allows unsigned 32-bit values.
@shakahl
shakahl / backup.ps1
Created June 7, 2023 01:30 — forked from vnau/backup.ps1
PowerShell script to backup files to ZIP archive excluding specific folders
param([Parameter(Mandatory)]$path)
$ErrorActionPreference = "Stop"
# top path that we want to keep in the source code zip file
$subdir = ""
# location of the zip file
$ZipFile = (Get-Item -Path ".\").FullName+"\"+(Split-Path $path -leaf)+".zip"
# change current directory
Set-Location "$path"
@erangaeb
erangaeb / podman
Created April 25, 2023 03:34
install podman
# install podman
❯❯ brew install podman
# initializes a new Linux runtime envirounment which known as podman machine
# podman behind the scene uses quem emulator to provide linux runtem envirounment
# --cpus 4 (specify cpus)
# --memory=6144 (specify memory)
❯❯ podman machine init --cpus 4 --memory=6144
# list podman machines
@marcpinet
marcpinet / README.md
Last active May 14, 2024 12:56
Activate Sublime Text 4 Build 4143 and below for ever (also maybe above, but not yet tried)

Activate Sublime Text (for ever)

  1. Go to https://hexed.it/
  2. Click Open File in the top left corner and select sublime_text.exe
  3. Press CTRL + F or on the Search for bar in the left panel and look for: 80 78 05 00 0f 94 C1
  4. Now in the editor, click on the first byte (80) and start replacing each byte by: C6 40 05 01 48 85 C9
  5. Finally, in the top left corner again, click on Save as and replace the old executable file with the newly created one.

Enjoy an Unlimited User License!

@shakahl
shakahl / gochroot
Created January 5, 2023 22:51 — forked from kevinxucs/gochroot
chroot wrapper script
#!/bin/bash
# Change this to the parent folder that holds all chroots
CHROOT_ROOT=/scratch/chroot
# DO NOT CHANGE!
chrootname="$1"
chrootdir="$CHROOT_ROOT/$chrootname"
chrootlock="$CHROOT_ROOT/$chrootname.lock"
pid=$$
@erangaeb
erangaeb / docker-compose.yml
Created November 12, 2022 10:07
deployment of vault with consul storage backend
version: '3.8'
services:
vault-consul:
image: erangaeb/vault-consul:0.1
ports:
- 8200:8200
environment:
- VAULT_ADDR=http://127.0.0.1:8200
- VAULT_API_ADDR=http://127.0.0.1:8200
@tanmay-bhat
tanmay-bhat / sed-replace.md
Created May 21, 2022 12:37
Use sed to replace value of key-value pair
sed -i '/^old-value /s/=.*$/=new-value/' file-name

Example

cat terraform.tfvars.example project_id = "gcp-123"