Skip to content

Instantly share code, notes, and snippets.

@kotakanbe
kotakanbe / ipcalc.go
Created September 17, 2015 02:59
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active January 13, 2025 03:52
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@rambolee
rambolee / update-dnsmasq-from-gfwlist.py
Last active September 23, 2024 11:10
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
anonymous
anonymous / calibration.txt
Created October 13, 2017 10:08
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 4 5 6 8 9 10 11 13 14 15 16 18 19 20 21 23 24 25 26 28 29 30 31 33 34 35 36 38 39 40 41 43 44 45 46 48 49 50 51 53 54 55 56 58 59 60 61 63 64 65 66 68 69 70 71 73 74 75 76 78 79 80 81 83 84 85 86 88 89 90 91 93 94 95 96 98 99 100 101 103 104 105 106 108 109 110 111 113 114 115 116 118 119 120 121 123 124 125 126 128 129 130 131 133 134 135 136 138 139 140 141 143 144 145 146 148 149 150 151 153 154 155 156 158 159 160 161 163 164 165 166 168 169 170 171 173 174 175 176 178 179 180 181 183 184 185 186 188 189 190 191 193 194 195 196 198 199 200 201 203 204 205 206 208 209 210 211 213 214 215 216 218 219 220 221 223 224 225 226 228 229 230 231 233 234 235 236 238 239 240 241 243 244 245 246 248 249 250 251 253 254 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
13 14 15 16 17 17 18 19 20 20 21 22 23 24 24 25 26 27 27 28 29 30 31 31 32 33 34 34 35 36 37 38 38 39 40 41 41 42 43 44 45 45 46 47
@KeloCube
KeloCube / MFTTest.cpp
Last active March 29, 2025 10:11
Hardware H.264 encoding using Media Foundation Transforms
// MIT License
//
// Copyright 2018 Otto Itkonen
//
// 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: