Skip to content

Instantly share code, notes, and snippets.

View RaheelYawar's full-sized avatar

Raheel Yawar RaheelYawar

View GitHub Profile
@pohzipohzi
pohzipohzi / redis-example.go
Last active March 22, 2022 15:59
Examples from redigo
// this is a file that puts together all redigo examples for convenience
// (see https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples)
//
// start by ensuring that redis is running on port 6379 (`redis-server`)
// uncomment the main method as needed, and run the script (`go run main.go`)
package main
import (
"fmt"
"github.com/gomodule/redigo/redis"
@sathiyaseelan
sathiyaseelan / golang_setup.md
Last active April 1, 2024 18:51
Basics to setup a golang project repo in your local

Simple Guide to setup Golang in your Mac and clone a repo.

Setup Go and workspace

Type go in terminal, to verify the installation.

  • Create a Go workspace and set GO PATH
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Analytics;
public class MyGameNameHereAnalytics : MonoBehaviour
{
private void Start()
{
DontDestroyOnLoad(this.gameObject);
// http://www.2ality.com/2013/09/javascript-unicode.html
function toUTF16(codePoint) {
var TEN_BITS = parseInt('1111111111', 2);
function u(codeUnit) {
return '\\u'+codeUnit.toString(16).toUpperCase();
}
if (codePoint <= 0xFFFF) {
return u(codePoint);
}
@ryochack
ryochack / 20140316-205912.go
Created March 16, 2014 13:28
golang reflection: interface of array
package main
import (
"fmt"
"reflect"
)
func dump_interface_array(args interface{}) {
val := reflect.ValueOf(args)
fmt.Println(val.Kind())
@tmichel
tmichel / index.html
Created November 9, 2013 22:07
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />