Skip to content

Instantly share code, notes, and snippets.

@tanaikech
tanaikech / submit.md
Created February 15, 2023 05:53
Retrieving Access Token from Service Account using oauth2client and google-auth with Python

Retrieving Access Token from Service Account using oauth2client and google-auth with Python

This is a sample script for retrieving the access token from the service account using oauth2client and google-auth with Python.

Sample script 1

Use oauth2client.

from oauth2client.service_account import ServiceAccountCredentials
@subhendu-de
subhendu-de / README.md
Last active November 2, 2024 07:55 — forked from hallazzang/README.md
Deploy JSP website using Docker + Apache Tomcat from scratch(with IDEs like Eclipse)

Docker + Apache Tomcat + JSP

This article describes how to deploy a JSP website using Docker and Apache Tomcat.

Directory structure

Create a "Dynamic Web Project" in eclipse and add a jsp file index.jsp

Organize your working directory like this:

@tklauser
tklauser / micro-k8s-setup.md
Last active January 8, 2024 13:37 — forked from joestringer/micro-k8s-setup.md
MicroK8s development environment setup for Cilium

Set up microk8s with Cilium for development

Microk8s is a Canonical project to provide a kubernetes environment for local development, similar to minikube but without requiring a separate VM to manage. These instructions describe setting it up for common development use cases with Cilium and may be helpful in particular for testing BPF kernel extensions with Cilium.

Microk8s will run its own containerd runtime, which may be initially confusing when building containers locally with docker. This guide assumes that you will use docker locally for building containers, and push these into a microk8s registry for use by containerd in the microk8s environment.

This guide works with MicroK8s 1.14 or above, with containerd. If you are running an earlier version, see the previous instructions.

Requirements

@OrionUnix
OrionUnix / Sublime Text 3.2.2 Build 3211 key licence
Last active October 27, 2024 16:45
Sublime Text 3.2.2 Build 3211 key licence
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@cutiko
cutiko / Readme.md
Created November 22, 2019 18:24
Git delete last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

ORIGINAL did fork but search didn't helped me

@tuklusan
tuklusan / hpux-inst-console.log
Created November 10, 2019 01:02
Install HP-UX 11i on QEMU: Installation Phase - HP 9000/778 Console; see https://supratim-sanyal.blogspot.com/2019/11/hpux-11i-v1-hpux-1111-pa-risc-guest.html
Script started on Sun Nov 3 01:32:30 2019
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$ telnet localhos  r   t 54321
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Firmware Version 6.1
Duplex Console IO Dependent Code (IODC) revision 1
@tuklusan
tuklusan / hpux-inst-qemu.log
Created November 10, 2019 01:00
Install HP-UX 11i on QEMU: Installation Phase - QEMU Monitor; see https://supratim-sanyal.blogspot.com/2019/11/hpux-11i-v1-hpux-1111-pa-risc-guest.html
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$ # -----------------------------------------------cat r.shvi r.sh./r.sh cat r.sh./qemu-system-hppa -net nic,model=helpversion
QEMU emulator version 4.1.50 (v4.1.0-2221-g36609b4fa3-dirty)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$
[localuser@dell-poweredge-2950 ~/Qemu-VirtualMachines/hpux]$ ./qemu-system-hppa -version# -----------------------------------------------cat r.shvi r.sh./r.sh cat r.sh./qemu-system-hppa -net nic,model=help
Supported NIC models:
e1000
e1000-82544gc
e1000-82545em
@goll
goll / README.md
Last active August 22, 2024 15:40
Docker nftables configuration for Debian 10
@schwarzeni
schwarzeni / util.go
Last active July 3, 2024 21:50
[golang] get specific network interface's IPv4 address
package util
import (
"errors"
"fmt"
"net"
)
// useful links:
// https://stackoverflow.com/questions/27410764/dial-with-a-specific-address-interface-golang