Skip to content

Instantly share code, notes, and snippets.

@Dammmien
Dammmien / wget.sh
Last active February 2, 2025 18:55
wget cheat sheet
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1
# But it may be sufficient
wget -mpk http://127.0.0.1
# Download all images of a website
@atraver
atraver / ServerRequestManager.cs
Created June 20, 2016 23:04
UnityWebRequest Dispose example
private IEnumerator ExecuteRequest<T>(BuildRequestDelegate builder, ResponseDelegate<T> callback,
Action cancelCallback, RequestOptions requestOptions)
{
using(UnityWebRequest serverRequest = builder())
{
bool showActivityIndicator = ((requestOptions & RequestOptions.ShowActivityIndicator) == RequestOptions.ShowActivityIndicator);
bool forceRetry = ((requestOptions & RequestOptions.ForceRetry) == RequestOptions.ForceRetry);
float startTime = Time.realtimeSinceStartup;
yield return serverRequest.Send();
@andyman
andyman / WebLocationChecker.cs
Created March 25, 2016 14:12
WebLocationChecker.cs
using UnityEngine;
using System.Collections;
using System.Text;
/**
* WebLocationChecker by @andyman404
* Licensed under Creative Commons Zero (do with it as you want, no credit needed)
* https://creativecommons.org/publicdomain/zero/1.0/
*
* This script site-locks your Unity Webplayer/WebGL build.
@arthurafarias
arthurafarias / load_mega_instances.sh
Last active March 15, 2025 19:59
Simple example script to load multiples instances of mega.co.nz client on linux.
#!/bin/sh
for d in */ ; do
HOME=$(pwd)/$d;
echo $d;
# Remove the comment by your need
# megasync # first run (configure client by client at once)
# megasync 2> /dev/null & # load all clients at non blocking way
done
@ronkorving
ronkorving / GetSystemLanguage.mm
Created January 28, 2015 07:20
Extracting iOS system language for Unity in Assets/Plugins/iOS/GetSystemLanguage.mm
#include "UnityAppController.h"
/*
* This Plug in will set a "systemLanguage" string key in PlayerPrefs with the system language code.
*/
@interface GetSystemLanguage : UnityAppController
@end
@implementation GetSystemLanguage
@thebeardphantom
thebeardphantom / .gitignore
Last active April 9, 2017 13:08
Unity GitIgnore
# Ignore everything
/*
/*/
# Inverse ignore some stuff
!/Assets/
!/ProjectSettings/
!.gitignore
# OS Stuff
@andyman
andyman / WebLocationChecker.cs
Created January 1, 2015 20:27
Simple script for Unity to check the domain that the web player is hosted on, and redirect it to the proper location if it is not in the list of domains. It does nothing if it is not a web player build.
using UnityEngine;
using System.Collections;
using System.Text;
/** Add this script to an object in the first scene of your game.
* It doesn't do anything for non-webplayer builds. For webplayer
* builds, it checks the domain to make sure it contains at least
* one of the strings, or it will redirect the page to the proper
* URL for the game.
*/
diff -ruN snes9x-1.53-src.orig/macosx/mac-cart.mm snes9x-1.53-src/macosx/mac-cart.mm
--- snes9x-1.53-src.orig/macosx/mac-cart.mm 2011-04-24 22:38:10.000000000 +0900
+++ snes9x-1.53-src/macosx/mac-cart.mm 2014-12-06 15:06:35.000000000 +0900
@@ -214,7 +214,7 @@
FSRef ref;
Boolean reply;
char name[PATH_MAX + 1];
-#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT
+#if defined(MAC_LEOPARD_TIGER_PANTHER_SUPPORT) || defined(MAC_YOSEMITE_SUPPORT)
IBNibRef customNib;
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active March 20, 2025 20:23
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active January 25, 2025 15:00
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*