Skip to content

Instantly share code, notes, and snippets.

View NaniteFactory's full-sized avatar
😊
Hi

NaniteFactory

😊
Hi
View GitHub Profile
@elieux
elieux / msys2-here-uninstall.reg
Created November 23, 2015 08:32
MSYS2 here context menu items
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW64 here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW32 here]
@ThunderCls
ThunderCls / visual_studio_dark_theme.ini
Last active January 8, 2024 06:44
Visual Studio Dark Theme by ThunderCls (http://i.imgur.com/auzFPxf.png)
[Colors]
AbstractTableViewBackgroundColor=#252526
AbstractTableViewHeaderTextColor=#000000
AbstractTableViewSelectionColor=#323238
AbstractTableViewSeparatorColor=#64646F
AbstractTableViewTextColor=#E8EADE
DisassemblyAddressBackgroundColor=#XXXXXX
DisassemblyAddressColor=#BD63C5
DisassemblyAutoCommentBackgroundColor=#XXXXXX
DisassemblyAutoCommentColor=#787878
@rolaveric
rolaveric / reverseProxy.go
Created February 23, 2014 06:25
Example of a reverse proxy written in Go
import (
"net/http"
"net/http/httputil"
"net/url"
"fmt"
)
func main() {
// New functionality written in Go
http.HandleFunc("/new", func(w http.ResponseWriter, r *http.Request) {
@Talv
Talv / list.py
Last active April 30, 2023 23:12
sc2 maps cache list
#!/usr/bin/python
import re
import glob
from mpyq import MPQArchive
# CACHE_DIR = '/home/kk/.wine/drive_c/users/Public/Application Data/Blizzard Entertainment/Battle.net/Cache'
CACHE_DIR = 'C:\ProgramData\Blizzard Entertainment\Battle.net\Cache'
class SC2Map(object):
@cuixin
cuixin / json_to_map.go
Created October 25, 2017 01:53
json to map[string]interface{} example in golang
package main
import (
"encoding/json"
"fmt"
)
func dumpMap(space string, m map[string]interface{}) {
for k, v := range m {
if mv, ok := v.(map[string]interface{}); ok {
@TheHippo
TheHippo / Makefile
Created March 31, 2016 22:32
Golang Makefile example
OUT := binariy-name
PKG := gitlab.com/group/project
VERSION := $(shell git describe --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
server:
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG}
@liubin
liubin / cookie.go
Created June 4, 2013 12:44
display cookie in go lang
@flaviocopes
flaviocopes / check-substring-ends-with.go
Last active November 15, 2021 09:34
Go: check if a string ends with a substring #golang
package main
import (
"strings"
)
func main() {
strings.HasSuffix("foobar", "bar") // true
}
@pokstad
pokstad / gaereverseproxy.go
Last active October 24, 2021 09:35
Google App Engine reverse proxy in Golang
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// HTTP reverse proxy handler
package goengine
import (
"io"
@montanaflynn
montanaflynn / proxy.go
Last active January 17, 2021 15:37
Golang reverse proxy
package main
import (
"log"
"net/http"
"net/http/httputil"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {