Skip to content

Instantly share code, notes, and snippets.

@sheepla
sheepla / remove_html_tags.go
Created September 9, 2023 08:29
Remove html tags from string with Go
package main
import (
"bytes"
"fmt"
"strings"
"golang.org/x/net/html"
)
@DanielRTeixeira
DanielRTeixeira / example.sct
Created November 2, 2017 15:21 — forked from nicholasmckinney/example.sct
SCT File Obfuscation Examples:
<?XML version="1.0"?>
<scriptlet>
<registration
progid="PoC"
classid="{F0001111-0000-0000-0000-0000FEEDACDC}" >
<!-- Proof Of Concept - Casey Smith @subTee -->
<!-- License: BSD3-Clause -->
<script language="JScript">
<![CDATA[
//x86 only. C:\Windows\Syswow64\regsvr32.exe /s /u /i:file.sct scrobj.dll

This recipe is a work in progress and has never been run as-is.

  • timeouts are in ms
  • lock timeout: in postgres, when a statement that wants a restrictive lock waits on another lock, other statements that want locks can't jump the queue. so even though the statement that is waiting might only take a very short amount of time, when it starts running, while it is waiting no other statements can begin. So we set the lock timeout pretty low and retry if we don't get it.
  • statement timeout: we set a short statement timeout before statements which do lock and which we expect to take a short amount of time, just in case something about our assumptions/understanding is wrong and the statement ends up taking a long time. if this happens the statement will bail early without causing harm, and we can investigate what is wrong with
@deton
deton / tsf-vim-vac2012.markdown
Last active April 20, 2024 03:40
Vi風操作をWindows用IMEとして実装
using System.Diagnostics;
using System.Net;
using APITesting.Contracts;
namespace YOUR_NAMESPACE_HERE;
public readonly struct ApiError : IEquatable<ApiError>
{
private const string DefaultErrorMessage = "An error occurred";
internal ApiError(HttpStatusCode statusCode, object? data)
@CPT-GrayWolf
CPT-GrayWolf / aacsdb-update
Last active April 20, 2024 03:37
Install Blu-Ray AACS VUK keys for libaacs automatically from the FindVUK database.
#! /bin/bash
#
# This is a simple bash script, designed to allow
# quick download and installation of the FindVUK
# AACS VUK database.
#
# This allows Blu-Ray disks who's VUK is known
# to be played on systems using libaacs.
#
# It's reccomended to schedule this file to run
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 03:36
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@brihernandez
brihernandez / FloatingOrigin.cs
Last active April 20, 2024 03:34
Floating origin to handle large worlds in Unity.
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling
// URL: http://wiki.unity3d.com/index.php/Floating_Origin
using UnityEngine;
using UnityEngine.SceneManagement;
public class FloatingOrigin : MonoBehaviour
{
[Tooltip("Point of reference from which to check the distance to origin.")]
public Transform ReferenceObject = null;
@gramcha
gramcha / having-multiple-jdk-macos.md
Created November 28, 2020 14:34
Managing multiple Java versions in MacOS

Installing different versions of open jdk through Homebrew(assuming already installed) and already having Java 8.

We need to install a tool called jenv - Java version manager which is similar to nvm(nodeJs version manager).

brew install jenv

Export the jenv path to .bash_profile or .zshrc - whatever you are using. I am using .zshrc