Skip to content

Instantly share code, notes, and snippets.

View Cyclenerd's full-sized avatar

Nils Cyclenerd

View GitHub Profile
@Cyclenerd
Cyclenerd / MyHttpClient.java
Last active March 1, 2017 10:55
Java & Apache HttpClient 4.5: Insecure HTTP(S) Client
import javax.net.ssl.SSLContext;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
// https://hc.apache.org/httpcomponents-client-4.5.x/index.html
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
@Cyclenerd
Cyclenerd / veloheroexport.py
Created April 22, 2017 13:19
Velo Hero Export Script
#!/usr/bin/env python
# This script downloads training data from Velo Hero
import sys, urllib2, urllib, json, logging, time
"""
Get Single Sign-on ID
https://app.velohero.com/sso
"""
@Cyclenerd
Cyclenerd / fibonacci.sh
Created July 25, 2017 17:57
Fibonacci number
#!/usr/bin/env bash
a="0"
b="1"
c=""
while [[ $b -lt 3000 ]]; do
c=$((a+b))
echo "$a + $b = $c"
a="$b"
@Cyclenerd
Cyclenerd / 00 slow sudo.md
Last active January 15, 2020 06:52
Slow sudo on macOS 10.12.4

Slow sudo on macOS 10.12.4

On my iMac 5k (iMac15,1) since the update on macOS 10.12.4 sudo is very slow. It takes about 5 minutes to the password prompt.

The problem is not on my MacBook Pro (MacBookPro13,1) with the same operating system 10.12.4.

With 10.12.3. I had no problems on the iMac.

Steps to Reproduce

@Cyclenerd
Cyclenerd / abap-s_not_dead.txt
Created August 25, 2021 11:38
ABAPs NOT DEAD.
████████████████████████████████████████████████████████████████████████████████
█████████████████████████████████████""▌ █████▀▀████████████████████████████
██████████████████████████▀▀▀"▀████" ▄#▓▓ █▀▄.⌐. ██████████████████████████
█████████████████▀▀▀▀▀███▀ `███▄ ▐███ .█ ▌ ▀""╙▀█████████████████████████
█████`▀█████ ███ ▄ ▀█b ╓████%▓▓▄ █████████████████████████
███". %▄, , ████ ███ ██ `█ `▓███████▄ ▄█████████████████████████
█▀.██ █▄ └██▄ ╙▌ ╓▄█ ████████████████████████████████████████
█ ███ ▀█▓ ▀▀ ▓███▌ .#▓▓██▀^Q,▌▄████████████████████████████████████████
█ ██▌ ,▄▄ ▀ └ " ┌╕ ║███████████████████████████████████████████████████
█▌ ▀█ ▓████ ─ ▄▄█▀███████████████████████████████████████████████████████
@Cyclenerd
Cyclenerd / hana-iaas-aws-azure-gcp.csv
Created January 26, 2022 18:53
Certified and Supported SAP HANA Hardware​ IaaS Platforms (Amazon Web Services, Microsoft Azure, Google Cloud Platform)
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 1.
Solution ;Vendor;CPU Architecture ;Memory;Size;TiB;IaaS Application Type ;Sockets ;vCPUs
S896OM;Microsoft Azure;Intel Cascade Lake SP;24.00;TiB;24,00;OLAP;16;896
S896OM;Microsoft Azure;Intel Cascade Lake SP;24.00;TiB;24,00;OLTP Scale-Out;16;896
o2-ultramem-896-metal;Google Cloud Platform;Intel Cascade Lake SP;24.00;TiB;24,00;OLTP;16;896
S896M;Microsoft Azure;Intel Cascade Lake SP;24.00;TiB;24,00;OLAP;16;896
S896M;Microsoft Azure;Intel Cascade Lake SP;24.00;TiB;24,00;OLTP Scale-Out;16;896
u-24tb1.metal;Amazon Web Services;Intel Cascade Lake SP;24.00;TiB;24,00;OLTP;8;448
S960m;Microsoft Azure;Intel Broadwell EX E7;20.00;TiB;20,00;OLTP;20;960
S672OM;Microsoft Azure;Intel Cascade Lake SP;18.00;TiB;18,00;OLAP;12;672
S672OM;Microsoft Azure;Intel Cascade Lake SP;18.00;TiB;18,00;OLTP Scale-Out;12;672
@Cyclenerd
Cyclenerd / install-openvscode-server.sh
Created April 1, 2022 15:33
Install Open Visual Studio Code (VSCode) Server / Gitpod
#!/bin/sh
MY_LAST_VERSION_URL="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/gitpod-io/openvscode-server/releases/latest)"
echo $MY_LAST_VERSION_URL
MY_LAST_VERSION="${MY_LAST_VERSION_URL#https://github.com/gitpod-io/openvscode-server/releases/tag/openvscode-server-v}"
echo $MY_LAST_VERSION
MY_DOWNLOAD_URL="https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${MY_LAST_VERSION}/openvscode-server-v${MY_LAST_VERSION}-linux-x64.tar.gz"
echo $MY_DOWNLOAD_URL
@Cyclenerd
Cyclenerd / GoogeSheetsAutomation.js
Created April 15, 2022 19:26
Google Clout - Workspace - Assisting Spreadsheet Automation
function update_table() {
const sourceSheetName = "Source";
const destinationSheetName = "Destination";
const ss = SpreadsheetApp.getActiveSpreadsheet();
const [src, dst] = [sourceSheetName, destinationSheetName].map(s => ss.getSheetByName(s));
// update the status column in the source table with the word ???
const setStatus = ['D2','D3','D6'];
src.getRangeList(setStatus).setValue("???"); // TODO: Add status word here
// add the current date to the Date column in the destination table
const date = new Date();
@Cyclenerd
Cyclenerd / Plz_lock_your_PC.txt
Created September 18, 2022 15:38
Bad USD: Please lock your PC
DELAY 2000
GUI r
DELAY 500
STRING notepad
DELAY 250
ENTER
DELAY 500
GUI UPARROW
DELAY 250
ENTER
@Cyclenerd
Cyclenerd / Win_Contrast.txt
Created September 18, 2022 16:01
Bad USD: High Contrast
DELAY 300
ALT-SHIFT PRINTSCREEN
DELAY 300
ENTER