Skip to content

Instantly share code, notes, and snippets.

View alan5281's full-sized avatar

alan alan5281

  • Game Company
  • Taiwan
View GitHub Profile
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 31, 2025 14:21
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
/*
* Qualys test program to check for presence of GHOST vulnerability
* For more info: http://www.openwall.com/lists/oss-security/2015/01/27/9
*/
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@ismasan
ismasan / sse.go
Last active February 27, 2025 00:15
Example SSE server in Golang
// Copyright (c) 2017 Ismael Celis
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
@wbroek
wbroek / genymotionwithplay.txt
Last active February 13, 2025 09:37
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@dchaplinsky
dchaplinsky / redis_tools.py
Created December 16, 2013 11:10
Very small but handy tool to export keys from redis to json by wildcards and load them back. Dead simple, no error processing, no warnings, no support for huge datasets (beware, dumping/loading 1GB of data will most likely consume way more ram that you are happy to allocate for that purpose)
import os
import sys
from redis import Redis
import argparse
import simplejson as json
import settings
redis_client = Redis(host=settings.REDIS_HOST, port=settings.REDIS_PORT,
db=settings.REDIS_DB)
@plentz
plentz / nginx.conf
Last active August 7, 2025 09:52
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@border
border / long_polling.go
Created September 25, 2012 09:58
long polling for golang
package main
import (
"container/list"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@ntakaaki
ntakaaki / nginx config file
Last active March 28, 2017 09:20
nginx startup script with cronolog
user nginx;
worker_processes 1;
error_log /var/log/nginx/error_log_pipe warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@bfncs
bfncs / jquery.animbpos.js
Created March 13, 2012 18:41
jQuery Plugin: Animate Background Position
/**
* jQuery: animate background position
* Author: Marc Löhe
* Based on a work by Alexander Farkas
*/
(function ($) {
$.extend($.fx.step,{
backgroundPosition: function(fx) {
if (fx.state === 0) {
@emonkak
emonkak / ldr-reload-image-without-referer.user.js
Created September 21, 2011 06:06
ldr-reload-image-without-referer.user.js
// ==UserScript==
// @name ldr-reload-image-without-referer
// @include http://reader.livedoor.com/reader/
// @include http://fastladder.com/reader/
// ==/UserScript==
(function() {
function initPool() {
var origin = location.protocol + '//' + location.host;
var html = document.implementation.createHTMLDocument('');