Skip to content

Instantly share code, notes, and snippets.

View LaserKaspar's full-sized avatar

Felix Kaspar LaserKaspar

View GitHub Profile
@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active June 13, 2024 22:34
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally

Commit jupyter notebooks code to git and keep output locally

  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

@MichaelCurrin
MichaelCurrin / export-netlix-list.md
Last active February 12, 2024 08:04
Export your list of favorite Netflix shows

Export Netflix List

Purpose

This gist helps your export names of shows on your Netflix profile list, so you can share those names with other people. You could put the output in a gist, blog post or email to your friends. I added mine as a gist here.

It will get the names of all the items on Netflix which are on My List. Shows that are your favorites or that you plan to watch. Note that this is separate from shows where you clicked the thumbs-up I like this button, which is more permanent, while you may want to trim your My List section down to remove shows you already watched. Unfortunately, I can't see any easy way to export all liked shows.

Requirements

@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@aleksandar-babic
aleksandar-babic / nginx-vhost.conf
Created June 20, 2018 09:20
Wordpress behind NGINX reverse proxy
location /blog/ {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass https://test-blog.bitstarz.com/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
@seckincengiz
seckincengiz / GroupUnityObjects.cs
Created January 3, 2018 11:32
Group unity objects in edit mode | (CTRL + G) | Unity3D
using UnityEngine;
using UnityEditor;
[ExecuteInEditMode]
public class GroupUnityObjects : Editor
{
[MenuItem("Edit/Group %g", false)]
public static void Group()
{
if (Selection.transforms.Length > 0)
@Mygod
Mygod / export-ble-infos.py
Last active April 22, 2024 17:14
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@ethack
ethack / TypeClipboard.md
Last active June 9, 2024 13:47
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@willurd
willurd / web-servers.md
Last active June 13, 2024 14:37
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@daveenguyen
daveenguyen / CheckInput.cs
Last active February 19, 2021 23:51
Just using this to see where the buttons are mapped to on my controller
using UnityEngine;
using System.Collections;
public class CheckInput : MonoBehaviour {
void Update(){
if ( Input.GetKeyDown ( KeyCode.JoystickButton0 )){Debug.Log("JoystickButton0");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton1 )){Debug.Log("JoystickButton1");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton2 )){Debug.Log("JoystickButton2");}
if ( Input.GetKeyDown ( KeyCode.JoystickButton3 )){Debug.Log("JoystickButton3");}
@tawashi5454
tawashi5454 / gist:1366964
Created November 15, 2011 12:27
Arduino USB Keyboard
/**
* VirtualUsbKeyboard
*
* Enumerates itself as a HID (Human Interface Device) to a host
* computer using a USB shield. The Arduino then appears to the host to
* be a USB keyboard and keypress events can be sent on demand.
*
* This example watches the state of 6 push buttons and when a button
* is pressed it sends a matching keypress event to the host.
*