Skip to content

Instantly share code, notes, and snippets.

View marslo's full-sized avatar

marslo marslo

View GitHub Profile
@thikade
thikade / vim_syntaxchecker.md
Last active June 25, 2024 04:52
vim syntax checker / syntastic yamllint

Getting vim yaml linter to work:

  1. Install syntastic vim plugin (as of vim 7.4.x no plugin manager is required anymore!)
    mkdir -p ~/.vim/pack/$USER/start/
    cd ~/.vim/pack/$USER/start/
    git clone https://github.com/vim-syntastic/syntastic.git
    
  2. Install yamllint: pip3 install yamllint
  3. Configure yamllint:
@davialexandre
davialexandre / gruvbox_dark.json
Created June 23, 2019 18:09
Gruvbox Dark color scheme for the new Windows Terminal
{
"background" : "#282828",
"black" : "#282828",
"blue" : "#458588",
"brightBlack" : "#928374",
"brightBlue" : "#83A598",
"brightCyan" : "#8EC07C",
"brightGreen" : "#B8BB26",
"brightPurple" : "#D3869B",
"brightRed" : "#FB4934",
@iexa
iexa / python-with-tcl.rb
Last active October 22, 2024 12:40
MacOS homebrew python 3.8.6 with tcl-tk (properly)
class Python < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org/"
url "https://www.python.org/ftp/python/3.8.6/Python-3.8.6.tar.xz"
sha256 "a9e0b79d27aa056eb9cce8d63a427b5f9bab1465dee3f942dcfdb25a82f4ab8a"
head "https://github.com/python/cpython.git"
license "Python-2.0"
revision 1
bottle do
@jermdavis
jermdavis / Extract-TarGz.ps1
Created May 9, 2019 14:14
A PowerShell script that can extract .tar.gz files on Windows - with minimal dependencies to make it easy to use on servers.
[cmdletbinding(SupportsShouldProcess=$True)]
param(
# What .tar.gz file should be extracted? Must exist.
[Parameter(Mandatory=$True)]
[string]$FileToExtract,
# What folder should the files be extracted into? Does not need to exist
[Parameter(Mandatory=$True)]
[string]$TargetFolder,
@thxCode
thxCode / windows-tools-installation.md
Last active December 7, 2023 08:17
Windows tools installation scripts

Installing Tools

Docker install

# default install
iwr -uri https://gist.githubusercontent.com/thxCode/cd8ec26795a56eb120b57675f0c067cf/raw/10d748f604764aa337864941b99d79154cbc5fc2/zz_docker_install.ps1 -UseBasicParsing | iex

# custom version install
@todd-a-jacobs
todd-a-jacobs / _cd.sh
Last active October 29, 2024 01:34
Change directory with CDPATH support.
# Change directory with CDPATH support. Culled from the bash-completion package.
_compopt_o_filenames ()
{
type compopt &> /dev/null && compopt -o filenames 2> /dev/null || compgen -f /non-existing-dir/ > /dev/null
}
_filedir ()
{
local i IFS='
@Tamal
Tamal / git-ssh-error-fix.sh
Last active May 18, 2026 13:34
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@aelindeman
aelindeman / password.groovy
Last active July 4, 2024 08:00
generate a password-like random string in Groovy
def length = 24
def password = new java.util.Random().with { r ->
def pool = ('a'..'z') + ('A'..'Z') + (0..9)
(1..length).collect { pool[r.nextInt(pool.size())] }.join('')
}
@chukaofili
chukaofili / heapster-influxdb-grafana.yaml
Last active January 20, 2023 09:10
heapster-influxdb-grafana
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: monitoring-influxdb
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
@ChrisLinn
ChrisLinn / book.json
Created March 27, 2018 06:02
gitbook book.json example
{
"title": "区块链工程师面试宝典",
"author": "Haoyu LIN",
"output.name": "site",
"gitbook": "3.2.3",
"root": "./",
"styles": {
"website": "styles/website.css"
},
"plugins": [