Skip to content

Instantly share code, notes, and snippets.

@AugustoCiuffoletti
AugustoCiuffoletti / HOWTO.md
Last active September 11, 2023 04:30
How to configure a Raspberry Pi as a mobile hotspot using a UMTS dongle

Configuring a Raspberry as a UMTS concentrator for IoT

Browsing around I found the pieces of this solution, and I put them together in a guide.

I did not use the guide in the Raspberry site since I found it complicate to make it compatible with the mobile dongle, and I used instead the NetworkManager daemon, following many advices in that sense I found in technical blogs. The problem with this solution is that, as of now, it is incompatible with the native solution in the Raspian distribution, and so I removed some native network tools. This is relevant if you plan to alter the network configuraton of the Raspberry, but it is otherwise transparent.

The reason why I developed this solution is to have an autonomous IoT concentrator device; as succh, it does not provide Internet access to devices connected to the RPi through WiFi or wired Ethernet. In t

@VincentSit
VincentSit / update_gfwlist.sh
Last active March 24, 2024 14:39
Automatically update the PAC for ShadowsocksX. Only tested on OS X. (Deprecated)
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@evantoli
evantoli / GitConfigHttpProxy.md
Last active June 19, 2024 00:17
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@mik30s
mik30s / webcam_capture.cpp
Last active October 16, 2023 05:06
Simple C++ program to capture a webcam frame in Linux
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <linux/v4l2-common.h>
#include <linux/v4l2-controls.h>
#include <linux/videodev2.h>
#include <fcntl.h>
#include <unistd.h>
@yowu
yowu / HttpProxy.go
Last active June 8, 2024 06:10
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@shuson
shuson / description-mysql_weakly-referenced object
Last active April 26, 2024 13:04
weakly-referenced object when connect to mysql in python
I came across this issue using the following code file
the error message is ReferenceError: weakly-referenced object no longer exists
reason is in the mysql/connector/cursor.py file
see these lines:
def _set_connection(self, connection):
"""Set the connection"""
try:
public class AgentInstaller {
/** The created agent jar file name */
protected static final AtomicReference<String> agentJar = new AtomicReference<String>(null);
/**
* Self installs the agent, then runs a person sayHello in a loop
* @param args None
*/
public static void main(String[] args) {