Skip to content

Instantly share code, notes, and snippets.

View devorbitus's full-sized avatar

Chris Gruel devorbitus

View GitHub Profile
@rmcguinness
rmcguinness / gen_proto_from_py.py
Last active July 3, 2025 19:25
Creates Protocol Buffer Files from Python Types using Ollama
import os
import requests
import json
import time
import concurrent.futures
import subprocess
import tempfile
import logging
# --- Configuration ---
echo ""
echo "************ Github Dork Links (must be logged in) *******************"
echo ""
echo " password"
echo "https://github.com/search?q="hackertarget.site"+password&type=Code"
echo "https://github.com/search?q=""hackertarget""+password&type=Code"
echo ""
echo " npmrc _auth"
@spinnaker-release
spinnaker-release / 1.20.0.md
Last active September 15, 2020 17:29
Spinnaker 1.20.x Release Notes

Spinnaker Release 1.20

Note: This release requires Halyard version 1.32.0 or later.

This release includes fixes, features, and performance improvements across a wide feature set in Spinnaker. Here we share a summary of notable improvements, followed by the comprehensive changelog.

Kubernetes V2 Run Job Stage

Spinnaker 1.20 no longer automatically adds a unique suffix to the name of jobs. Prior to this release, the Kubernetes V2 Run Job stage added a unique suffix to the name of the deployed job, with no ability to control or configure this behavior.

To continue having a random suffix added to the job name, set the metadata.generateName field instead of metadata.name, which causes the Kubernetes API to append a random suffix to the name.

@tanaikech
tanaikech / submit.md
Last active January 5, 2025 06:09
Simple Script of Resumable Upload with Google Drive API for Node.js

Simple Script of Resumable Upload with Google Drive API for Node.js

This is a simple sample script for achieving the resumable upload to Google Drive using Node.js. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL.

In this sample, a PNG file is uploaded with the resumable upload using a single chunk.

Sample script

Before you use this, please set the variables.

@benbjurstrom
benbjurstrom / Code.gs
Last active August 14, 2025 17:16
PurgeOldEmails
/*
|--------------------------------------------------------------------------
| PurgeOldEmails
|--------------------------------------------------------------------------
| https://gist.github.com/benbjurstrom/00cdfdb24e39c59c124e812d5effa39a
|
*/
// Purge messages automatically after how many days?
var DELETE_AFTER_DAYS = 7
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: spinnaker-ingress
namespace: spinnaker
annotations:
ingress.gcp.kubernetes.io/pre-shared-cert: "GOOGLE_MANAGED_CERT"
kubernetes.io/ingress.global-static-ip-name: "spinnaker"
kubernetes.io/ingress.allow-http: "false"
spec:
@techpulsetoday
techpulsetoday / how-to-execute-a-bash-script-from-github-gist.md
Last active December 11, 2023 08:12
Execute bash script directly from URL

Execute bash script directly from a URL

bash <(curl -Ls https://example.com/script.sh)
bash <(curl -Ls https://raw.githubusercontent.com/techpulsetoday/scripts/master/vim-bootstrap)

Passing Parameters to bash when executing a script fetched by curl

curl https://example.com/script.sh | bash -s arg1 arg2 arg3
curl https://raw.githubusercontent.com/techpulsetoday/scripts/master/virtualhost | sudo bash -s create local.techpulsetoday.com /var/www/html/local.techpulsetoday.com/
@mumoshu
mumoshu / helmify-kustomize
Last active December 13, 2024 13:20
Run `helmify-kustomize build $chart $env` in order to generate a local helm chart at `$chart/`, from kustomize overlay at `${chart}-kustomize/overlays/$env`
#!/usr/bin/env bash
cmd=$1
chart=$2
env=$3
dir=${chart}-kustomize
chart=${chart/.\//}
build() {
@tanaikech
tanaikech / submit.md
Created May 20, 2018 04:44
Create Folder Tree of Google Drive using Node.js

Create Folder Tree of Google Drive using Node.js

This is a sample script for retrieving a folder tree using Node.js. In this sample, you can set the top of folder for the folder tree. In generally, the folder tree is created by retrieving folders from the top folder in order. For example, when Google Apps Script is used, the script becomes like this. But when Drive API is used for this situation, if there are a lot of folders in the top folder, a lot of APIs are required to be called. So in this sample, I have tried to create the folder tree by a small number of API calls as possible.

In this sample, in order to be easy to understand the flow, I used Quickstart for Node.js. When you use this sample script, at first, please check the document of Quickstart. And I confirmed that this sample worked at googleapis v30.0.0.

Flow :

  1. Retrieve all folders in Google Drive.
@igorvoltaic
igorvoltaic / useradd.sh
Last active July 25, 2024 10:23
Create new user using command line in Mac OS X. Do not forget to set correct permissions for the file.
#!/bin/sh
if [[ `id -u` != 0 ]]; then
echo "Must be root to run script"
exit
fi
read -p "Enter user name and press [ENTER]: " UserName
if [[ $UserName == `dscl . -list /Users UniqueID | awk '{print $1}' | grep -w $UserName` ]]; then