Skip to content

Instantly share code, notes, and snippets.

@andrewgotow
andrewgotow / IntersectionGlow.shader
Created September 11, 2016 16:52
Unity - Depth Intersection Shader
Shader "Unlit/Intersection Glow"
{
Properties
{
_Color ("Color", Color) = (1,0,0,1)
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 6, 2024 08:45
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@richarddun
richarddun / gist:1bb11d32cafc394efbcb8f4a8b6cb130
Last active April 23, 2024 14:22
scapy script to send http requests
#!/usr/bin/env python
"""
Script to open TCP connection and send 1 HTTP GET request containing
a specific string, and header
Usage:
./http.py <IP_of_target>
There is only one mandatory argument, which is the target IP address.
package main
import "encoding/json"
// Unescape UTF-8 string
// e.g. convert "\u0e27\u0e23\u0e0d\u0e32" to "วรญา"
func UnescapeString(str string) (unescapedString string) {
json.Unmarshal([]byte(`"`+str+`"`), &unescapedString)
return
}
@yarwelp
yarwelp / cmu_fedora.md
Last active October 30, 2023 14:24
Using Computer Modern Unicode LaTeX fonts with LibreOffice Writer on Fedora 23

Using Computer Modern Unicode LaTeX fonts with LibreOffice Writer on Fedora 23

First quit LibreOffice Writer if you have it running. Next, perform the following commands.

sudo dnf install texlive-cm-unicode
mkdir -p ~/.fonts/
dnf repoquery -l texlive-cm-unicode | egrep '\.otf$' \
 | xargs -I{} ln -s {} ~/.fonts/
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@lalten
lalten / sr_fsm.py
Last active November 6, 2015 22:23
Example on how to use finites state machines on a Student Robotics robot.
# -*- coding: utf-8 -*-
# Solution for Munich kickstart tasks 2015
# Introduces the vision system, servo control and a finate state machine
# ----------------------------------------------------------------------
#
# Loest die Aufgaben, die in den Zeilen stehen, die mit #TASK# beginnen.
# ----------------------------------------------------------------------
# import SR libraries
@wagonli
wagonli / DeviceTypeHelper.cs
Last active September 10, 2019 22:32
Detect device type on Universal Windows Platform (UWP)
using Windows.System.Profile;
using Windows.UI.ViewManagement;
namespace Wagonli.Tools
{
public static class DeviceTypeHelper
{
public static DeviceFormFactorType GetDeviceFormFactorType()
{
switch (AnalyticsInfo.VersionInfo.DeviceFamily)
//Now with less jquery
//1) go to your my-list page, and scroll to the bottom to make sure it's all loaded:
//http://www.netflix.com/browse/my-list
//2) Next, paste this in your developer tools console and hit enter:
[...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label'))
//or use this to copy the list to your clipboard:
copy([...document.querySelectorAll('.slider [aria-label]')].map(ele => ele.getAttribute('aria-label')))