Skip to content

Instantly share code, notes, and snippets.

View ProteusCortex's full-sized avatar

Angelos Ioannis Kitsantas ProteusCortex

  • Greece
  • 13:14 (UTC +03:00)
View GitHub Profile
@pshlos46
pshlos46 / linux_hplt4132.md
Last active November 4, 2023 09:30
HP lt4132 4G modem linux support (EliteBook G5)

[How-To] HP lt4132 - 4G LTE modem - Linux support

This guide has been tested in Xubuntu 18.04.01 but it will probably apply in most linux distro's. Contents are heavily based on work by @toreanderson here.

So HP Elitebook G5 has as an LTE modem the HP lt4132 which is actually re-brand of Huawei ME906s-158.

If you see the output from usb-devices you'll see that the issue lies that the modem is in configuration 2 (Cfg#= 2). The Linux kernel selects configuration 2 by default, but that does not work with ModemManager. Configuration 3 ( MBIM mode) is a much better choice.

Changing to configuration 3 is easy enough. Note that it is essential to first deconfigure the device by selecting configuration

@acamino
acamino / HttpClientApproach.cs
Last active April 25, 2024 18:01
4 Ways to Parse a JSON API with C#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace HttpClientApproach
{
internal class Contributor
{
public string Login { get; set; }
@alechko
alechko / canon_shuttercount
Last active January 12, 2023 08:55
Get Canon EOS DSLR camera shutter count with gphoto2.
# connect your camera with USB cable, for 6D model you have to disable the WiFi first.
# then see if camera is connected by using:
gphoto2 --auto-detect
# if you see something like:
#
# user@x250:~$ gphoto2 --auto-detect
# Model Port
# ----------------------------------------------------------
# Canon EOS 6D usb:001,006
#
@asmerkin
asmerkin / Vagrant.bootstrap.sh
Last active June 13, 2022 12:45
A simple LAMP Vagrantfile and Bootstrap file for Vagrant and ubuntu/trusty64 box. It uses mpm-workers and php5-fpm + some extra tools like grunt, gulp and composer.
#!/usr/bin/env bash
# ---------------------------------------
# Virtual Machine Setup
# ---------------------------------------
# Adding multiverse sources.
cat > /etc/apt/sources.list.d/multiverse.list << EOF
deb http://archive.ubuntu.com/ubuntu trusty multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
@Artanis
Artanis / minecraft-ultimate-tool-set.rst
Last active September 26, 2021 03:21
Crazy items in Minecraft.

Minecraft Ultimate Tool Set

Requires creative mode or operator power on a multiplayer server. On a single player game (survival or hardcore), you will need "cheats" enabled to move into creative mode. Don't forget to leave creative mode when done.

These items might be stupid. Be prepared to repair the country-side.

@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@dtao
dtao / increment_decrement.py
Created May 25, 2012 16:10
Sublime Text plugin to increment/decrement all selected numbers
import sublime
import sublime_plugin
class NumberCommand(sublime_plugin.TextCommand):
def run(self, edit):
selection = self.view.sel()
for region in selection:
try:
value = int(self.view.substr(region))
self.view.replace(edit, region, str(self.op(value)))