Skip to content

Instantly share code, notes, and snippets.

@kitschysynq
kitschysynq / gist:867caebec581cee4c44c764b4dd2bde7
Created April 10, 2017 13:45
List running qemu instances with nicely formatted output
ps -ef | awk -e '/qemu/ && !/awk/' | sed -e 's/[^/]*//' -e 's/ -/\n\t-/g'
@xameeramir
xameeramir / default nginx configuration file
Last active May 4, 2024 17:27
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@Restioson
Restioson / Readme.md
Last active May 4, 2024 17:27
[Obsidian] Search through your Fantasty Statblocks bestiary by CR/type

Monster Search

Search through your Fantasty Statblocks bestiary by monster CR and type, using Dataview!

image

How to add

  1. Make sure that Meta-Bind, Fantasy Statblocks, Dataview and is installed
@sfider
sfider / DataGameViewportClient.cpp
Last active May 4, 2024 17:26
UE4 Pixel Perfect GameViewportClient
#include "DataGameViewportClient.h"
#include "Engine.h"
#include "Engine/LocalPlayer.h"
#include "SceneView.h"
constexpr int RENDER_WIDTH = 320;
constexpr int RENDER_HEIGHT = 180;
UDataGameViewportClient::UDataGameViewportClient(FVTableHelper& Helper)
: Super(Helper)
@eggbean
eggbean / install_golang.sh
Last active May 4, 2024 17:23
Script for automated installation or updating Go. For Linux and macOS, x86_64, arm64 and arm.
#!/bin/bash -e
# This script installs or updates to the latest version of Go.
# Multi-platform (Linux and macOS)
# Multi-architecture (amd64, arm64, arm) support
#
# Add to your .profile, .bash_profile or .zshenv:
# export PATH=$PATH:/usr/local/go/bin
error_string=("Error: This command has to be run with superuser"
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created May 4, 2024 17:23
Rimworld output log published using HugsLib
Log uploaded on Saturday, May 4, 2024, 7:23:09 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0ModSettingsFramework(1.0.0), 0MultiplayerAPI(av:0.3.0,fv:0.3.0), 0PrepatcherAPI(1.1.1), ExplosiveTrailsEffect(1.0.7140.31563), GraphicCustomization(1.0.0), HeavyWeapons(1.0.0), KCSG(av:1.1.2,fv:24.4.15), MVCF(2.0.0.1), NoCamShakeExplosions(1.0.0), OPToxic(1.0.0), Outposts(av:3.0.0,fv:1.0.0), PipeSystem(av:1.0.1,fv:22.7.29), RecipeInheritance(1.0.1), RRO(1.0.0), SmokingGun(1.0.0), VanillaStorytellersExpanded(1.0.0), VanillaWeaponsExpandedLaser(0.0.0), VFECore(av:1.1.7,fv:1.1.9), VWEMakeshift(1.0.0)
Vanilla Fishing Expanded(VanillaExpanded.VCEF): VCE-Fishing(1.0.0)
@zmts
zmts / tokens.md
Last active May 4, 2024 17:22
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active May 4, 2024 17:18
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.
@anthonyray
anthonyray / readme.md
Last active May 4, 2024 17:18
Setting up OhMyZsh on a rapsberry Pi
  1. Connect to your raspberry Pi with SSH
  2. Install zsh : sudo apt-get update && sudo apt-get install zsh
  3. Edit your passwd configuration file to tell which shell to use for user pi : sudo vim /etc/passwd and change /bin/bash and /bin/zsh
  4. Reconnect to your raspberry, and check that zsh is the shell with echo $0.
  5. Switch to root : sudo su
  6. Install OhMyZsh : sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
  7. Disconnect from your instance and reconnect it.