Skip to content

Instantly share code, notes, and snippets.

View tuefekci's full-sized avatar

Giacomo Tüfekci tuefekci

View GitHub Profile
@jkonrath
jkonrath / windows-cmd-faq.md
Last active September 22, 2023 17:59
Windows CMD batch file frequent issues/tips

Writing Windows CMD Batch File Stuff

I hope I never have to write another Windows .BAT file again in my life, but if I don't jot this stuff down, I will forget it, and then I will.

Subroutines

  1. Use :somelabel to define a block of code.
  2. Use call :somelabel to jump to a defined label, run that block of code to the end, then return.
  3. Use goto :label to jump to that label.
  4. Put :eof at the end of your file.
@rubo77
rubo77 / rotatescreen.sh
Last active August 1, 2023 17:16
This script rotates the screen (tested on a Lenovo Yoga 730-15iwl) (source: https://askubuntu.com/a/1217290/34298)
#!/bin/bash
# This script rotates the screen and touchscreen
# by Ruben Barkow-Kuder: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen device with `xinput`
TouchscreenDevice="$(xrandr |grep eDP|cut -d" " -f1)"
if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
@stokkes
stokkes / README.md
Last active March 21, 2024 01:37
Rclone Plex Sonarr Radarr Read&Write

Rclone v1.40 for Plex/Sonarr/Radarr Read/Write

This small guide should help you get setup with rclone v1.40 to read/write directly to a cache mount and have Plex get notified of new tv/movies that get added to the mount by Radarr/Sonarr

Assumptions

  1. You're using rclone v1.40
  2. You're using Radarr & Sonarr
  3. If you're using docker for plex/sonarr/radrr, you must ensure the volumes attached to the containers are all the same path, i.e.: /mnt/user/media:/media for all 3. If not, the auto-scan will likely not work properly.
@0xjac
0xjac / private_fork.md
Last active April 26, 2024 14:38
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@michidk
michidk / OutlineShader.shader
Last active April 8, 2024 01:06
An outline shader made for Unity with the help of @OverlandGame. It adjusts the size of the outline to automatically accomodate screen width and camera distance.
// An outline shader made for Unity with the help of @OverlandGame by @miichidk
// It adjusts the size of the outline to automatically accomodate screen width and camera distance.
// See how it looks here: https://twitter.com/OverlandGame/status/791035637583388672
// How to use: Create a material which uses this shader, and apply this material to any meshrenderer as second material.
Shader "OutlineShader"
{
Properties
{
_Width ("Width", Float ) = 1
_Color ("Color", Color) = (1,1,1,1)
@twolfson
twolfson / .gitignore
Last active March 27, 2020 20:29
Proof of concept to explore media keys for https://github.com/twolfson/google-music-electron/issues/31
node_modules/
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@b1rdex
b1rdex / is-focused.js
Created February 25, 2014 05:48
node-webkit window.isFocused emulation
(function() {
window.frame = require("nw.gui").Window.get();
window.frame.isFocused = true;
var windowFocusHandler = function() {
window.frame.isFocused = true;
}
, windowBlurHandler = function() {
window.frame.isFocused = false;
@rtgibbons
rtgibbons / logger.js
Created November 7, 2013 13:51
Logger Library with winston
var app = require(process.cwd() + '/app');
var winston = require('winston');
var _ = require('lodash');
// Set up logger
var customColors = {
trace: 'white',
debug: 'green',
info: 'green',
warn: 'yellow',
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048