Skip to content

Instantly share code, notes, and snippets.

@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active May 9, 2024 15:40
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@yoksel
yoksel / gist:a8e9d3a9f740bb9e149f
Last active May 9, 2024 15:39
SVG Symbols Shower Bookmarklet
javascript:void(function(){
var doc = document;
var body = doc.querySelector("body");
var head = doc.querySelector("head");
var icons = "";
var resultElem = doc.querySelector("#icons-shower");
if ( !resultElem ) {
@bruce-willis
bruce-willis / yunohost-oracle-free-tier.md
Last active May 9, 2024 15:39
How to setup YunoHost at Oracle free tier VM
  1. Register for Oracle Cloud Free Tier
  2. Create compute instance
    • change image to Canonical Ubuntu
    • confirm that a public IPv4 address is assigned
    • upload your public ssh key
    • leave everything blank in Boot volume
  3. Enable Internet Access
    • Instances → Instance details → Subnet → Default Security List → Add Ingress Rules
    • HTTP: Stateless: Checked
@Keshav13142
Keshav13142 / .obsidian.vimrc
Last active May 9, 2024 15:40
obsidian-vimrc
" Have j and k navigate visual lines rather than logical ones
nmap j gj
nmap k gk
" Go to beginning/end of line
nmap gh ^
nmap gl $
" Cycle between tabs
exmap tabprev obcommand workspace:previous-tab
@mattifestation
mattifestation / CertTBSHash.ps1
Created September 7, 2017 01:13
Calculates a ToBeSigned hash of a certificate, producing the same uniquely identifying hash present in code integrity rule sets.
# Example: ls 'C:\Windows\System32\*' -Include '*.dll' | Get-AuthenticodeSignature | Select -ExpandProperty SignerCertificate | Get-TBSHash
filter Get-TBSHash {
[OutputType([String])]
param (
[Parameter(Mandatory, ValueFromPipeline)]
[Security.Cryptography.X509Certificates.X509Certificate2]
$Certificate
)
@Faria-Ejaz
Faria-Ejaz / Map.js
Last active May 9, 2024 15:40
react Leaflet Map with Auto-suggest Search #leaflet #react-leaflet #search
/** @format */
import { Map, TileLayer, Marker, Popup } from "react-leaflet";
import React, { useEffect, useState, useRef } from "react";
import { geosearch } from "esri-leaflet-geocoder";
import "leaflet/dist/leaflet.css";
import "esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css";
import L from "leaflet";
function MapView(props) {
@maddouri
maddouri / build-static-python.sh
Created December 6, 2015 22:42
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
@smetronic
smetronic / NMEAParser.cs
Created February 13, 2019 10:02
C# NMEA Parser $GPRMC, $GPGSV, $GPGSA
using System;
using System.Globalization;
public class NmeaInterpreter
{
// Represents the EN-US culture, used for numers in NMEA sentences
public static CultureInfo NmeaCultureInfo = new CultureInfo("en-US");
// Used to convert knots into miles per hour
public static double MPHPerKnot = double.Parse("1.150779",
NmeaCultureInfo);
@fnky
fnky / ANSI.md
Last active May 9, 2024 15:36
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27