Skip to content

Instantly share code, notes, and snippets.

View 40a's full-sized avatar

40a

View GitHub Profile
@ToniWonKanobi
ToniWonKanobi / custom.scss
Last active May 1, 2024 12:26
Custom Stylesheet for Desktop Safari
// Variables
// Color for <code> and <pre>
$lighterGray: lighten(black, 25%);
// Background color for <code>
$lightGray: lighten(lightgray, 10%);
// Border color for <pre> and <code>
$darkGray: darken(lightgray, 3%);
// Background color of YouTube
$darkerGray: darken(gray, 35%);
@cmosgh
cmosgh / Jenkinsfile
Created March 12, 2018 06:56
Jenkins stages with different containers
podTemplate(label: 'mypod',
containers: [
containerTemplate(name: 'docker', image: 'docker', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'kubectl', image: 'lachlanevenson/k8s-kubectl:v1.9.3',command:'cat', ttyEnabled: true),
containerTemplate(name: 'node', image: 'node:8.10-alpine', command: 'cat', ttyEnabled: true),
containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm', ttyEnabled: true, command: 'cat', priviledged: true)
],
volumes:[
hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'),
]
@alexellis
alexellis / configure.sh
Created January 27, 2018 10:45
Kubernetes-weave-ubuntu.sh
#!/bin/sh
sudo apt-get update \
&& sudo apt-get install -qy docker.io
sudo apt-get update \
&& sudo apt-get install -y apt-transport-https \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
@Moutard3
Moutard3 / mp3-upload-direct-link.md
Last active April 11, 2025 21:12
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@rwaldron
rwaldron / Setting up Google Cloud Storage with CORS for Web Fonts.md
Created January 16, 2018 21:47 — forked from mhulse/Setting up Google Cloud Storage with CORS for Web Fonts.md
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

@WoZ
WoZ / README.md
Last active January 6, 2020 10:52
Strace reads and writes analyzer

Usage: node strace_log_analyzer.js strace.log /tmp

This scripts parses input file that must contain strace log from a single thread. Then script calculates:

  • execution time of read/write syscall for each file descriptor and summarize execution time for each 1 sec period,
  • calulates amount of read/write syscalls for each file descriptor

strace log must be collcted with -t -T -f options.

#!/bin/bash
DOCKER_COMPOSE_FILES='docker-compose1.yml,docker-compose2.yml'
DOCKER_COMPOSE_UP_MODE=1 #1|0
DOCKER_COMPOSE_UP_LOG_FILE='/tmp/log.txt'
DOCKER_COMPOSE_BUILD_OPTIONS="" #any options for `docker-compose build`
DOCKER_COMPOSE_UP_OPTIONS="" #any options for `docker-compose up`
DOCKER_COMPOSE_RUN_OPTIONS="" #any options for `docker-compose run`
TEST_CONTAINERS="application1=/test.sh,application2=/test2.sh"
##### get port remover #####
@technosophos
technosophos / post-receive.sh
Created November 10, 2017 21:39
Git post-receive hook that creates Brigade event
#!/bin/bash
while read oldrev newrev refname
do
short_sha=${newrev:0:8}
ulid=$(/usr/local/bin/ulid)
build_id="acid-worker-${ulid}-${short_sha}"
e_build_id=$(echo "$build_id" | base64 -w 0)
e_project_id=$(echo "$ACID_PROJECT_ID" | base64 -w 0)
e_acidjs=$(git show ${newrev}:acid.js | base64 -w 0)
@jaredcatkinson
jaredcatkinson / Get-KerberosTicketGrantingTicket.ps1
Last active December 29, 2024 12:06
Kerberos Ticket Granting Ticket Collection Script and Golden Ticket Detection Tests
function Get-KerberosTicketGrantingTicket
{
<#
.SYNOPSIS
Gets the Kerberos Tickets Granting Tickets from all Logon Sessions
.DESCRIPTION
Get-KerberosTicketGrantingTicket uses the Local Security Authority (LSA) functions to enumerate Kerberos logon sessions and return their associate Kerberos Ticket Granting Tickets.