Skip to content

Instantly share code, notes, and snippets.

View lc6chang's full-sized avatar
💡
I may be slow to respond.

ChangLiu lc6chang

💡
I may be slow to respond.
  • Kolmostar Inc., Beihang University
  • Beijing, China
  • 23:15 (UTC +08:00)
View GitHub Profile
@alexandreelise
alexandreelise / README.md
Last active October 25, 2024 00:12
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04

Hi! gcc users

There is good news for you. I made a new repository with a single Dockerfile to build every combinations of versions of Ubuntu LTS and gcc you like

Find out more on https://github.com/alexandreelise/install-gcc

@rkasigi
rkasigi / install-L2TP-IPsec-on-ubuntu-18.04.md
Last active July 1, 2025 03:08
Install VPN L2TP IPSec on Ubuntu 18.04

Install L2TP IPsec Connection on Ubuntu 18.04

L2TP on its own is not secure enough, so we’ll need to pair this protocol with IPSec.

To establish an L2TP VPN connection from the Ubuntu command line, we must first install strongswan and xl2tpd

Install requirements

We’re going to use StrongSwan for IPSec.

apt-get install strongswan xl2tpd -y
@claymcleod
claymcleod / pycurses.py
Last active April 28, 2025 17:11
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@veproza
veproza / AGPS.md
Last active October 15, 2024 13:53
Getting u-blox MAX-7C GPS to work with Assisted A-GPS

Getting u-blox MAX-7C GPS to work with Assisted A-GPS

So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).

Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.

In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat