Skip to content

Instantly share code, notes, and snippets.

View rogeliodh's full-sized avatar

Rogelio Domínguez Hernández rogeliodh

  • Mexico City
  • 16:33 (UTC -06:00)
View GitHub Profile
@catatonicChimp
catatonicChimp / grocyAddMessurements.php
Last active January 23, 2023 18:03
Add messurements to grocy
<?php
$apiaccess =[
"url" => "https://grocy.yourdomain.tld/api",
"key" => ""
];
$quantity_units = [
"Cup US" => [
"name" => "Cup US",
"description" => "",
"name_plural" => "Cups US"
@randompherret
randompherret / quantity_unit.php
Last active March 29, 2024 01:29
Script to import conversion factors into grocy
<?php
$apiaccess =[
"url" => "https://grocy.yourdomain.tld/api",
"key" => "1234password"
];
$quantity_units = [
"Cup" => [
"name" => "Cup",
"description" => "",
"name_plural" => "Cups"
@DannyQuah
DannyQuah / 2020.06-D.Quah-Pulse-Secure-Client-on-Ubuntu-Linux.md
Last active March 18, 2024 16:12
Pulse Secure Client on Ubuntu Linux

Pulse Secure Client on Ubuntu Linux

by Danny Quah, June 2020 (revised Jan 2022)

Pulse Secure Client is a VPN client that allows secure connection to a Pulse Connect Secure SSL VPN gateway. Many universities use that latter for faculty, staff, and student access to their computer systems. However, because Linux comes in many different flavors, the standard Pulse Secure Client installer does not always run to completion. (For one, [UWO.ca][] suggests "PulseSecure's understanding of Linux package managers and distributions in general seems very limited.") The user is then either forced to use a Windows machine, somehow, or fail VPN access when traveling with their Linux notebook.

This Gist describes the steps I took to install Pulse Secure Client on my Ubuntu-based Linux machines, including a Pixelbook running GalliumOS 3.1 and Dell desktops running Ubuntu 18.04 and 20.04. Other writeups elsewhere that I've looked at describe the same problems I encountered, but were either out-dated, overly localised,

@agentphantom
agentphantom / mx_complete.csv
Last active December 31, 2021 22:06
Casos Confirmados, Defunciones, Ambulatorios, Hospitalizados e Intubados por Municipio
entidad municipio confirmados defunciones activos ambulatorios ambulatorios_fallecidos hospitalizados hospitalizados_fallecidos intubados intubados_fallecidos
Aguascalientes Aguascalientes 32906 2613 722 27150 181 5756 2432 716 569
Aguascalientes Asientos 606 48 4 478 6 128 42 20 10
Aguascalientes Calvillo 1252 34 7 1107 2 145 32 18 13
Aguascalientes Cosío 149 14 0 108 0 41 14 10 7
Aguascalientes El Llano 129 22 2 85 0 44 22 14 12
Aguascalientes Jesús María 1236 86 48 1011 12 225 74 38 24
Aguascalientes No Especificado 2 0 0 2 0 0 0 0 0
Aguascalientes Pabellón de Arteaga 1081 76 6 905 5 176 71 37 29
Aguascalientes Rincón de Romos 1003 74 4 771 3 232 71 39 28
@williamcaban
williamcaban / ocp-4.2-hugepages-1g.md
Last active July 5, 2022 13:26
Configure 1G Hugepages in OpenShift 4.2

Configure 1G Hugepages in OpenShift 4.2

Update Node Kernel Parameters

Supporting 1G hugepages requires the Kernel to support 1G Hugepages. This is done by applying a boot Kernel parameter.

  • Create a MachineConfig (MC) to apply to the Node type that will be using the 1G hugepages. The following example set 1G hugepages for all worker nodes 50-kargs-1g-hugepages.yaml:
    apiVersion: machineconfiguration.openshift.io/v1
    

kind: MachineConfig

@alphapapa
alphapapa / fitness.org
Last active April 6, 2024 04:33
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

@stefancocora
stefancocora / vpn-openconnect-connect-to-cisco-anyconnect.md
Created September 25, 2017 08:48
Split tunneling with openconnect - A guide on how to use openconnect to establish a vpn connection to an enterprise cisco anyconnect vpn endpoint with client side routing.

Introduction

The purpose of this short howto is to show you how to:

  • use openconnect [1] to connect to an enterprise cisco anyconnect endpoint
  • whilst minimizing the amount of traffic that your route through the vpn connection

Usually VPN administrators will puth the default route to the users, so that all user traffic is routed through the vpn connection. This is to address the various security concerns around compromised user computers bridging external internet traffic into the secure VPN network.

While the VPN administrator can push routes to the clients, the client can ignore these default routes and establish client side routing so that only the required A.B.C.D/E network is routed through the VPN. All other traffic will still use the clients default route and default outbound internet connection.

I have run an nginx container...
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6d67de07731d nginx "nginx -g 'daemon ..." 40 minutes ago Up 40 minutes 80/tcp, 443/tcp epic_goldberg
I want to use Debian for debug:
docker run -it --pid=container:6d67de07731d --net=container:6d67de07731d --cap-add sys_admin debian
I can see the nginx process:
#/bin/bash
TMPDIR="./tmp-build-all"
function usage()
{
echo "Usage: $0 <build file>"
echo "Example:"
echo "$0 ../www/buildserver/builds"
exit 1
@JannieT
JannieT / dev.py
Last active April 27, 2023 14:39
Environment for scripting LibreOffice with Python
import uno
import sys
def createUnoService(id):
ctx = getContext()
return ctx.ServiceManager.createInstanceWithContext(id, ctx)
def getContext():
# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()