Skip to content

Instantly share code, notes, and snippets.

View boris1993's full-sized avatar
:shipit:
Code hard, die hard.

Boris Zhao boris1993

:shipit:
Code hard, die hard.
View GitHub Profile
@rajkosto
rajkosto / odi_keygen.py
Created November 18, 2022 12:56
ODI SFP XPON stick MAC_KEY generator
#!/usr/bin/env python3
#ODI DFP-34X-2C2 MAC_KEY key generator by rajkosto
import sys
import string
import hashlib
args = sys.argv
if len(args) != 2:
sys.exit("Usage: odi_keygen.py YOURMACADDR")
@Nezarn
Nezarn / d4_passwords.txt
Created September 2, 2018 18:53
Initial D Arcade Stage 4 - Password unlocks
PW list by Nezarn
~~~~~~~~~~~~~~~~~
Go to test menu and select PASSWORD CONFIRMATION, then you need to "type" in the letters with test menu button,
and go to next letter with service button, after you put in the password, press confirm, you should get a msg
what you unlocked and if the password was correct or not.
Passwords:
~~~~~~~~~~
QRKYIMVP
4X8WFOKI
#!/bin/sh
# ZTE F450G 垃圾, WebUI 有漏洞,LAN 上 ajax 调用的 URI 并不需要认证。
#
# 获取路由信息的 URI 返回 json 如下:
# {"macAddr":"aa:bb:cc:dd:ee:ff","productClass":"F450G","wanIpAddr":"xxx.xxx.xxx.xxx","swVer":"V2.0.0P1T1sh","flashSize":256,"dnsIpAddr":"xxx.xxx.xxx.xxx","ramSize":467,"Status":"0","lanIpAddr":"192.168.1.1","runTime":"1619682","CmdType":"GET_GW_INFO"}
#
# wanIpAddr 即是我们需要的外部 IP。
#
# 格式化后:
# {
@adamcharnock
adamcharnock / howto.md
Last active June 18, 2020 01:48
Kubernetes install on Ubuntu 17.10 via kubeadm

Kubernetes install on Ubuntu 17.10 via kubeadm

Initial setup

apt-get update
apt-get upgrade
apt-get install curl

# Check VXLAN exists
@agarwalparas
agarwalparas / gist:d355a950148702cc7ba82abc4d1943bf
Created November 3, 2017 04:06
Recover Force Push on Github
# First, you must get the previous commit sha, the one before the forced push:
## Hit through terminal
curl -u <username> https://api.github.com/repos/:owner/:repo/events
# Then you can create a branch from this sha:
## Hit through terminal
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs
@fotock
fotock / nginx.conf
Last active May 2, 2024 02:43 — forked from plentz/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
anonymous
anonymous / API.md
Created August 27, 2016 16:56
@jumar
jumar / gist:9200840
Last active April 3, 2024 22:07
Send magic wol packet java
import java.io.*;
import java.net.*;
public class WakeOnLan {
public static final int PORT = 9;
public static void main(String[] args) {
if (args.length != 2) {
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@omnicolor
omnicolor / RB-precommit.php
Last active July 26, 2023 14:42
SVN pre-commit intergration with Review Board
#!/usr/local/bin/php
<?php
/**
* Pre-commit Subversion script.
*
* Forces the commit message to have a line like
* review: 42
* and checks that the review has received a Ship It! from
* a peer.
* @author Omni Adams <omni@digitaldarkness.com>