Skip to content

Instantly share code, notes, and snippets.

@sinanm89
sinanm89 / .txt
Created September 18, 2021 01:11
Morse Code Mnemonic : Big letters are an ordered binary tree list, Left adds DOT right adds DASH; morse code
View .txt
an ET named IAN thought to himself "M SUR, WD40 Kan fix the Golden High Voltage Frequency" (LOL)' get your PJs Back Xross the CaYmanZ Qtip
@sinanm89
sinanm89 / cpp
Created May 2, 2021 08:01
ue4 quat functions for blueprint
View cpp
public:
// Convert Euler Rotations To Quaternions
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Euler To Quaternion", Keywords = "rotation, quaterion"), Category = "Quaternion Rotation")
static FQuat Euler_To_Quaternion(FRotator Current_Rotation);
// Function to set world rotation of scene component to input quaternion rotation
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Set World Rotation (Quaterion)", Keywords = "rotation, quaternion"), Category = "Quaternion Rotation")
static void SetWorldRotationQuat(USceneComponent* SceneComponent, const FQuat& Desired_Rotation);
@sinanm89
sinanm89 / find_and_replace.sh
Created April 7, 2021 07:58
find_and_replace_all_files_directories.sh
View find_and_replace.sh
# change all the folders and files' names from "source" to "destination". This will not replace contents
source='' destination='' find . -type d -iname '*${source}*' | while read FILE ; do
newfile="$(echo ${FILE} |sed -e 's/${source}/${destination}/')" ;
mv "${FILE}" "${newfile}" ;
done
View gist:0d34e21bd648fd2ff1273d6f8a7dd4c3
You need to create two files in a new folder - **always-show-rolls** - in your modules folder:
**module.json**
{
"name": "always-show-rolls",
"description": "Show rolls",
"title": "Always Show Rolls",
"version": "1.0.0",
"minimumCoreVersion": "0.4.5",
@sinanm89
sinanm89 / git-clearHistory
Created August 26, 2020 02:28 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
View git-clearHistory
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@sinanm89
sinanm89 / wsl_setup.txt
Last active March 9, 2022 18:49
wsl setup instructions
View wsl_setup.txt
# Turn on developer mode in windows programs and features
# Install Ubuntu 20.04 from the Windows Store
# Install Windows Terminal from the Windows Store
$ sudo apt-get update
# https://github.com/pyenv/pyenv/wiki/common-build-problems
$ sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
@sinanm89
sinanm89 / README.md
Created December 19, 2019 07:30 — forked from mill1000/README.md
Headless A2DP Audio Streaming on Raspbian Stretch
View README.md

About

This gist will show how to setup Raspbian Stretch as a headless Bluetooth A2DP audio sink. This will allow your phone, laptop or other Bluetooth device to play audio wirelessly through a Rasperry Pi.

Motivation

A quick search will turn up a plethora of tutorials on setting up A2DP on the Raspberry Pi. However, I felt this gist was necessary because this solution is:

  • Automatic & Headless - Once setup, the system is entirely automatic. No user iteration is required to pair, connect or start playback. Therefore the Raspberry Pi can be run headless.
  • Simple - This solution has few dependencies, readily available packages and minimal configuration.
  • Up to date - As of December 2017. Written for Raspbian Stretch & Bluez 5.43

Prerequisites

@sinanm89
sinanm89 / workplace questions
Last active July 18, 2019 13:32
Good questions to ask before starting a job
View workplace questions
are you looking to fill a position or expand your current team
- what was the reason for the last engineers leave?
how diverse is your workplace?
how many engineers do you have thatve worked with the company for more than 4 years?
View docker-compose.yml
# TODO: the ports should be dynamically set from the data_service.env file
version: '3'
services:
my_app_service:
container_name: my_app
restart: "no"
build:
context: .
env_file:
- ./config/my_app.env