Skip to content

Instantly share code, notes, and snippets.

@tanis2000
tanis2000 / CoreSimulator-Clean.txt
Created January 24, 2024 08:27 — forked from mariohercules/CoreSimulator-Clean.txt
~/Library/Developer/CoreSimulator/Devices - Clean
# Delete/Clean XCode /CoreSimulator/Devices/ folder
$ xcrun simctl delete unavailable
@tanis2000
tanis2000 / Advanced.txt
Created June 30, 2023 15:06 — forked from callowaysutton/Advanced.txt
Introduction to Hacking
HOW TO CRACK, by +ORC, A TUTORIAL
Lesson A.1: Advanced Cracking: Internet Cracking (Unix)
-------------> INTERNET CRACKING: FIREWALLS
With each new company that connects to the "Information
Superhighway" new frontiers are created for crackers to explore.
Site administrators (Siteads) have implemented various security
measures to protect their internal networks. One of these is
xinetd, covered later. A more general solution is to construct
@tanis2000
tanis2000 / get-interface-ip-mask.go
Created March 22, 2021 13:52
Example of getting the IP and netmask of an interface with Golang
package main
import (
"fmt"
"net"
"os"
)
func main() {
mgmtInterface, err := net.InterfaceByName("ens160")
@tanis2000
tanis2000 / closure_table.md
Last active March 22, 2021 11:36
Persistent tree structure using closure table in MySQL

Using closure tables to manage hierarchical relations in MySQL

Create DB tables

Create a table to represent tree nodes.

CREATE TABLE `tree_node` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `data_body` text,

node_deleted datetime DEFAULT NULL,

@tanis2000
tanis2000 / valheim-console-guide.md
Created March 12, 2021 18:16 — forked from Sonata26/valheim-console-guide.md
Valheim Console Commands Guide Backup
/*===============================================================================
Copyright (c) 2020, PTC Inc. All rights reserved.
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
===============================================================================*/
#include "AppController.h"
#include "MathUtils.h"
/*===============================================================================
Copyright (c) 2020 PTC Inc. All Rights Reserved.
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
===============================================================================*/
package com.vuforia.engine.NativeSample
import android.app.Activity
@tanis2000
tanis2000 / hash.c
Created February 27, 2020 11:00 — forked from niklas-ourmachinery/hash.c
Tool for patching static hash macros in source code
// hash can generate static hashes of strings or patch TM_STATIC_HASH("...", v)
// macros in source code with the correct hash values.
#include <foundation/carray.inl>
#include <foundation/git_ignore.h>
#include <foundation/log.h>
#include <foundation/murmurhash64a.inl>
#include <foundation/os.h>
#include <foundation/temp_allocator.h>
sampler TextureSampler : register(s0);
float2 ViewportSize;
float4x4 ScrollMatrix;
void SpriteVertexShader(inout float4 color : COLOR0, inout float2 texCoord : TEXCOORD0, inout float4 position : POSITION0)
{
// Half pixel offset for correct texel centering.
position.xy -= 0.5;
// Viewport adjustment.
///////////////////////////////////////////////
// glsl snippets: credit given where i could //
///////////////////////////////////////////////
///////////////////
// inverse matrices
// credit to: https://github.com/glslify/glsl-inverse/blob/master/index.glsl
float inverse(float m) {
return 1.0 / m;