Skip to content

Instantly share code, notes, and snippets.

View z3nth10n's full-sized avatar
🏠
Working from home

Álvaro Rodríguez z3nth10n

🏠
Working from home
View GitHub Profile
@marcospgp
marcospgp / FloatingOrigin.cs
Last active March 14, 2024 06:59
A floating origin script for Unity.
// Based on script found at http://wiki.unity3d.com/index.php/Floating_Origin
// on 2021-05-13, modified substantially - mostly to accomodate multiplayer,
// by introducing threshold and offset values.
using UnityEngine;
public class FloatingOrigin : MonoBehaviour {
public static FloatingOrigin Instance;
// Largest value allowed for the main camera's X or Z coordinate before that
@baunov
baunov / server.ts
Last active August 18, 2022 14:24
Detect crawling bots within Angular Universal. Serve SSR for bots and SPA for regular users.
import 'zone.js/dist/zone-node';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { join } from 'path';
import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';
import * as isbot from 'isbot';
@brihernandez
brihernandez / FloatingOrigin.cs
Last active April 29, 2024 16:04
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;
@neilt6
neilt6 / AVAudioEngineOut.cs
Created February 18, 2020 17:06
NAudio Driver for Xamarin.iOS
using AVFoundation;
using Foundation;
using NAudio.Wave;
using System;
using System.Threading;
namespace NAudio.Wave
{
/// <summary>
/// Represents an iOS wave player implemented using <see cref="AVAudioEngine"/>.
@neilt6
neilt6 / AudioTrackOut.cs
Last active March 27, 2024 09:34
NAudio Driver for Xamarin.Android
using Android.Media;
using NAudio.Wave;
using System;
using System.Threading;
namespace NAudio.Wave
{
/// <summary>
/// Represents an Android wave player implemented using <see cref="AudioTrack"/>.
/// </summary>
@z3nth10n
z3nth10n / a_dynamic_ip_from_namedotcom.md
Last active February 17, 2022 18:28
Updates your dynamic IP using name.com services

Name.com IP updater

Updates your dynamic IP using name.com services

This is useful when your have a local server in home.

Setup (3 steps)

Linq.py uses Python 2.7+ be careful!

@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active April 23, 2024 17:11 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@acosonic
acosonic / attack_urls.txt
Last active November 16, 2021 13:29
Comprehensive list of attack/probe URL's
#This was done by some tool, don't know which one, and our custom built app captured theese URL's, after filtering
#for unique URL's, here is list of URL's in original form, I will later try to create some protection
/3B1728A10D221805D2CABE58B095D353.php
/manager/html
/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php
/mysql/mysqlmanager/index.php
/mysql/sqlmanager/index.php
/mysql/dbadmin/index.php
/mysql/admin/index.php
/phpmy/index.php
@premitheme
premitheme / README.md
Last active March 23, 2024 22:08
Recover MAMP MySQL database using .frm and .ibd files after InnoDB crash

Recover MAMP MySQL database using .frm and .ibd files after InnoDB crash

After a power faliur (also can be a sudden restart or system crash), I ended up with corrupted database and lost the access to my local hosted websites for development. Even the MAMP's MySQL server was not starting.

Preparation

You will need to find the databases folders, in case of MAMP they are located in Applications/MAMP/db/mysql56 (or mysql57 depending on MySQL version).

You will find folders containing the database name, inside them you will find .frm and .ibd files. Take a copy of the entire folder for backup in another place, the desktop for example.

@davydka
davydka / WSL+X11.md
Last active May 10, 2024 02:47
X11 setup for Windows Susbsytem for Linux (WSL)
  • Open Powershell as Administrator and run: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Open the Microsoft Store, search for Ubuntu, and install
  • Launch Ubuntu and create your Linux user
  • Open a shell into WSL (I like cmder so far: http://cmder.net/)
  • In Windows, download and install MobaXterm (free version): https://mobaxterm.mobatek.net/download.html
  • Make sure X server is running
    • You’ll always need to run MobaXterm, and in the top right corner of the app there’s an "X server" button. Make sure it’s running.
    • In mobaxterm settings -> x11 -> set OpenGL Acceleration to: Hardware
  • WSL won't have a display environment variable set by default, so tell it manually to connect to the first display: export DISPLAY=:0.0
  • Test an x11 app: sudo apt-get install x11-apps