Skip to content

Instantly share code, notes, and snippets.

View turboBasic's full-sized avatar
🔮
Focusing

andriy melnyk turboBasic

🔮
Focusing
View GitHub Profile
@kobake
kobake / git-commit-size.sh
Created November 5, 2017 13:42
Calculate size of a git commit object.
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: git-commit-size.sh <commit hash>" 1>&2
exit 1
fi
HASH=$1
ITEM_LIST="`git diff-tree -r -c -M -C --no-commit-id $HASH`"
@Shourai
Shourai / namecheap SSL.md
Created October 21, 2017 12:49
Letsencrypt SSL certificate with namecheap hosting

source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/

The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

@MarvinJWendt
MarvinJWendt / wordlist-german.txt
Created September 7, 2017 03:19
All german words (german wordlist).
This file has been truncated, but you can view the full file.
AA
AAA
Aachen
Aachener
Aachenerin
Aachenerinnen
Aachenern
Aacheners
Aachens
@turboBasic
turboBasic / Get-ChromeExtensionSettings-Context.txt
Last active December 1, 2017 12:12
[Get-ChromeExtensionSettings-Context] settings for chrome extension "Context" #chrome
eyJ2ZXJzaW9uIjoxLCJjb250ZXh0cyI6W3sibmFtZSI6IkVtcHR5IiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvY29uZmlnLnBuZyIsImljb24iOiJzaG93X2NvbnRleHQiLCJleHRlbnNpb25zIjpbXX0seyJuYW1lIjoiTWluIiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvc3Rhci5wbmciLCJpY29uIjoic2hvd19jb250ZXh0IiwiZXh0ZW5zaW9ucyI6W3siaWQiOiJnaWdobW1waW9ia2xmZXBqb2NuYW1na2tiaWdsaWRvbSIsImljb24iOiJjaHJvbWU6Ly9leHRlbnNpb24taWNvbi9naWdobW1waW9ia2xmZXBqb2NuYW1na2tiaWdsaWRvbS8xNi8wIn0seyJpZCI6Imhkb2tpZWpucGltYWtlZGhhamhkbGNlZ2VwbGlvYWhkIiwiaWNvbiI6ImNocm9tZTovL2V4dGVuc2lvbi1pY29uL2hkb2tpZWpucGltYWtlZGhhamhkbGNlZ2VwbGlvYWhkLzE2LzAifV19LHsibmFtZSI6IlNoYXJlIiwiaW1nU3JjIjoiaWNvbnMvZG9ydG11bmQvY3VzdG9tZXJzLnBuZyIsImljb24iOiJzaG93X2NvbnRleHQiLCJleHRlbnNpb25zIjpbeyJpZCI6InBkY29oa2hoamJpZmttcGFrYWlvcG5sbG5kZG9mYmJuIiwiaWNvbiI6ImNocm9tZTovL2V4dGVuc2lvbi1pY29uL3BkY29oa2hoamJpZmttcGFrYWlvcG5sbG5kZG9mYmJuLzE2LzAifSx7ImlkIjoicGlvY2xwb3BsY2RiYWVmaWhhbWpvaG5lZmJpa2ppbGMiLCJpY29uIjoiY2hyb21lOi8vZXh0ZW5zaW9uLWljb24vcGlvY2xwb3BsY2RiYWVmaWhhbWpvaG5lZmJpa2ppbGMvMTYvMCJ9LHsiaWQiOiJnb2piZGZucG5ob2dm
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 5, 2025 16:18
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@keithga
keithga / Get-LatestUpdate.ps1
Last active September 26, 2024 21:54
script to get latest build.
<#
.SYNOPSIS
Get the latest Cumulative update for Windows
.DESCRIPTION
This script will return the list of Cumulative updates for Windows 10 and Windows Server 2016 from the Microsoft Update Catalog.
.NOTES
Copyright Keith Garner ([email protected]), All rights reserved.
@michaellihs
michaellihs / SemVer.groovy
Created April 12, 2017 21:42
Semantic Versioning class for Groovy
enum PatchLevel {
MAJOR, MINOR, PATCH
}
class SemVer implements Serializable {
private int major, minor, patch
SemVer(String version) {
def versionParts = version.tokenize('.')
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@RickCogley
RickCogley / !readme.md
Last active November 17, 2022 07:21
Use jq to do date math

Current

I am using the fantastic jq to manipulate a REST API's json, into a csv for upsertting into another database system, via its API. Once in the target system, I'm doing some date math, including rounding time stamps to 30 min intervals to allow me to do group them, for standard deviation calculation. The problem is, there is a lot of data and the database chokes when it has to round every record and then do std dev calculations on each.

  • Sample.json shows a small sample of what the input data looks like, but actually it's just stdout from the curl command in the shell script.
  • example-initial.sh shows the important bit of the initial shell script, that uses curl to authenticate against the data location's API, and then use jq to add a couple of columns and export to csv. It works like a charm.
  • ACME-X1-A.csv is an example of the output CSV file, that's then upsertted into the target db.

Goal