Skip to content

Instantly share code, notes, and snippets.

View arunkarnann's full-sized avatar
🎯
Focusing

Arun Karnan arunkarnann

🎯
Focusing
View GitHub Profile
@cortvi
cortvi / !Refractive Surface Shader.md
Last active March 31, 2022 22:55
Custom refractive liquid surface shader
We couldn’t find that file to show.
@andrewlimaza
andrewlimaza / example.html
Created December 19, 2016 11:31
Print certain div / elements using window.print()
<script>
function printDiv(divName){
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
@lasagnaphil
lasagnaphil / SoundManager.cs
Created June 9, 2016 10:31
SoundManager class from Unity (basic sound management)
using UnityEngine;
using System.Collections.Generic;
[System.Serializable]
public class SoundData
{
public SoundManager.Sounds soundEnum;
public AudioClip audioClip;
[Range(0.0f, 1.0f)]
public float volume = 1.0f;
@derme302
derme302 / GoogleMap.cs
Last active January 31, 2024 07:38
Load a Google Map into Unity3D
/*
* Based on the Google Maps for Unity Asset
* https://www.assetstore.unity3d.com/en/#!/content/3573
* However the relience on UniWeb has been removed
*
*
Getting Started
---------------
1. Assign the GoogleMap component to your game object.
@jimfleming
jimfleming / Blur.shader
Last active May 3, 2017 04:49
A simple separable blur shader with tint pass.
Shader "Hidden/Blur" {
Properties {
_MainTex ("", 2D) = "white" {}
_BlurSize ("", Range(0.0, 1.0)) = 1.0
_Tint ("", Color) = (0.0, 0.0, 0.0, 0.0)
_Tinting ("", Range(0.0, 1.0)) = 0.64
}
SubShader {
@christianroman
christianroman / test.py
Created May 30, 2013 16:02
Bypass Captcha using 10 lines of code with Python, OpenCV & Tesseract OCR engine
import cv2.cv as cv
import tesseract
gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE)
cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY)
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
tesseract.SetCvImage(gray,api)
print api.GetUTF8Text()
using UnityEngine;
using System.Collections;
using System.Security.Cryptography;
using System.Text;
public class EncryptedPlayerPrefs {
// Encrypted PlayerPrefs
// Written by Sven Magnus
// MD5 code by Matthew Wegner (from [url]http://www.unifycommunity.com/wiki/index.php?title=MD5[/url])
@randomecho
randomecho / australian-postcodes.sql
Last active May 11, 2024 07:46
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;