Skip to content

Instantly share code, notes, and snippets.

@narate
narate / create-hotspot.md
Last active May 16, 2024 04:35
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"

Uninstall brew package and dependencies

Remove package's dependencies (does not remove package):

brew deps [FORMULA] | xargs brew remove --ignore-dependencies

Remove package:

@Rob--W
Rob--W / README.md
Last active August 8, 2020 03:02
Analysis of WOT 20151208
@spaze
spaze / opera-vpn.md
Last active April 20, 2024 02:14
Opera VPN behind the curtains is just a proxy, here's how it works

2023 update

ℹ️ Please note this research is from 2016 when Opera has first added their browser "VPN", even before the "Chinese deal" was closed. They have since introduced some real VPN apps but this below is not about them.

🕵️ Some folks also like to use this article to show a proof that the Opera browser is a spyware or that Opera sells all your data to 3rd parties or something like that. This article here doesn't say anything like that.


When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below, also see The Oprah Proxy.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

I was getting the following error in the spark-shell when trying to load lzo files (CDH 5.4)
ERROR GPLNativeCodeLoader: Could not load native gpl library
java.lang.UnsatisfiedLinkError: no gplcompression in java.library.path
The fix invovles making spark-shell aware of this dependency by either of the follwoing
1. export LD_LIBRARY_PATH=/opt/cloudera/parcels/GPLEXTRAS/lib/hadoop/lib/native/
2. add saftey value in spark configuration in cloudera manager
Spark (Standalone) Service Advanced Configuration Snippet (Safety Valve) for spark-conf/spark-env.sh
### hostapd configuration file, loosely based on http://pisarenko.net/blog/2015/02/01/beginners-guide-to-802-dot-11ac-setup/
### for Realtek RTL8812AU via driver https://github.com/abperiasamy/rtl8812AU_8821AU_linux
### and hostap 2.5
### Operates at 135 Mbps in 802.11n/ht mode. iperf measures ~8.00 MBytes/sec 67.1 Mbits/sec
### I was not able to get 802.11ac/vht mode with additional side-channels configured with the driver.
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=wlan2
driver=nl80211
@yinheli
yinheli / v2ex_daily.go
Last active December 2, 2019 20:49
领取 v2ex 每日奖励 golang
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"regexp"
"strings"
)
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@mike-zhang
mike-zhang / udpProxy.go
Created October 8, 2012 15:58
Implementation of a UDP proxy in Golang
// Implementation of a UDP proxy
package main
import (
"flag"
"fmt"
"log"
"net"
"os"