Skip to content

Instantly share code, notes, and snippets.

View timperrett's full-sized avatar
🚧

Timothy Perrett timperrett

🚧
View GitHub Profile
@timperrett
timperrett / disable-tmobile-5g-home-internet-rotuer-wifi.md
Created November 14, 2023 01:25 — forked from orther/disable-tmobile-5g-home-internet-rotuer-wifi.md
JS Code To Disable WiFi for T-Mobile 5G Home Internet Router

This script can be copied into the browser console and used to disable wifi on the T-Mobile 5G Home Internet router. The web interface for the router doesn't allow you to disable it.

Steps

  1. Go to http://192.168.12.1
  2. Open dev console (on mac [cmd]+[opt]+i)
  3. Copy the code from the below JS file and with the password value updated to be your actual password and hit enter
  4. Call the code by typing tmobileHomeInternetDisableWifi() and hitting enter
##: ----------------------------------------------------------------------------
##: Copyright (C) 2017 Verizon. All Rights Reserved.
##:
##: Licensed under the Apache License, Version 2.0 (the "License");
##: you may not use this file except in compliance with the License.
##: You may obtain a copy of the License at
##:
##: http://www.apache.org/licenses/LICENSE-2.0
##:
##: Unless required by applicable law or agreed to in writing, software
function kubeui(){
if [ ! "$#" -eq 1 ]; then
echo -e "Usage:"
echo -e "kubeui <clustername>"
else
cluster_name="${1}"
if kubectl config use-context "${cluster_name}"; then
echo "[INFO] switched to cluster '${cluster_name}'"
@timperrett
timperrett / gist:e6079101ae469822a9b2c8c1a46429aa
Created April 30, 2018 07:56 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
nelson {
network {
# Typically Nelson is hosted behind a reverse proxy, or otherwise bound
# to an internal address. In order for cookie retention to work for browsers,
# and for Nelson to rewrite its generated URLs to locations that are
# network accessible, the operator must tell Nelson what that external address is.
external-host = "nelson.yourco.com"
}
github {
# If you're operating Nelson in conjunction with Github Enterprise, then you
[2017-03-27 22:37:03.045][169][info][main] [C9] new connection
[2017-03-27 22:37:03.046][169][debug][http] [C9] new stream
[2017-03-27 22:37:03.046][169][debug][http] [C9][S3] request headers complete (end_stream=true):
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] ':authority':'192.168.99.100:9211'
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] 'user-agent':'curl/7.43.0'
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] 'accept':'*/*'
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] 'x-stack':'aloha'
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] ':path':'/'
[2017-03-27 22:37:03.047][169][debug][http] [C9][S3] ':method':'GET'
[2017-03-27 22:37:03.047][169][debug][router] [C9][S3] cluster 'aloha' match for URL '/'
root@d0c3205330f6:/build#
root@d0c3205330f6:/build# nslookup localhost
Server: 10.0.2.3
Address: 10.0.2.3#53
Name: localhost
Address: 127.0.0.1
root@d0c3205330f6:/build# dig localhost
root@8ef36ea8930a:/build# curl -q http://localhost:9901/stats | grep cds
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13485 0 13485 0 0 2334k 0 --:--:-- --:--:-- --:--:-- 2633k
cluster.cds.internal.upstream_rq_200: 6
cluster.cds.internal.upstream_rq_2xx: 6
cluster.cds.internal.upstream_rq_504: 1
cluster.cds.internal.upstream_rq_5xx: 1
cluster.cds.lb_healthy_panic: 0
cluster.cds.lb_local_cluster_not_ok: 0
sds::default_priority::max_connections::1024
sds::default_priority::max_pending_requests::1024
sds::default_priority::max_requests::1024
sds::default_priority::max_retries::3
sds::high_priority::max_connections::1024
sds::high_priority::max_pending_requests::1024
sds::high_priority::max_requests::1024
sds::high_priority::max_retries::3
sds::tcp://127.0.0.1:4000::cx_active::1
sds::tcp://127.0.0.1:4000::cx_connect_fail::0
@timperrett
timperrett / rpi-setup.sh
Last active December 3, 2016 22:11
initial commands to run on a new rpi 3 for server applications
$ sudo apt-get update && sudo apt -y dist-upgrade
$ sudo passwd root
<enter new password>
$ sudo systemctl disable avahi-daemon
$ sudo systemctl disable avahi-daemon.socket
$ sudo systemctl stop bluetooth && sudo systemctl disable bluetooth
& sudo apt-get install -y htop