For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
#!/bin/bash | |
OAUTH2_TOKEN=<fill in your own OAUTH2 token> | |
OWNER=tiesmaster | |
REPO=Coolkit.Converters # retrieve this with: basename $(git config --get remote.origin.url) .git | |
curl https://api.github.com/repos/${OWNER}/${REPO}/branches/master \ | |
-H "Authorization: token $OAUTH2_TOKEN" \ | |
-H "Accept: application/vnd.github.loki-preview+json" \ |
First install Brew on your MAC
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew tap homebrew/dupes
brew tap homebrew/php
brew install php70
mcrypt
: brew install mcrypt php70-mcrypt
brew install composer
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/chzyer/readline" | |
"k8s.io/client-go/kubernetes" | |
"k8s.io/client-go/pkg/api/v1" | |
"k8s.io/client-go/tools/clientcmd" |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
import hashlib | |
import time | |
max_nonce = 2 ** 32 # 4 billion | |
def proof_of_work(header, difficulty_bits): | |
# calculate the difficulty target | |
target = 2 ** (256-difficulty_bits) |
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "The AWS CloudFormation template for Kinesis Stream", | |
"Parameters": { | |
"Environment": { | |
"Description": "dev, stage, or prod - this is for bucket tags", | |
"Type": "String", | |
"MinLength": "3", | |
"MaxLength": "5" | |
} |
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
k8s-app: kube-proxy | |
name: kube-proxy-amd64 | |
namespace: kube-system | |
spec: | |
revisionHistoryLimit: 10 | |
selector: |
Questions are not from any actual exam!!! | |
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl | |
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
Once the job has completed, check the logs to and export the result to pi-result.txt. | |
Solution: |
#! /bin/bash | |
# in this script I assume you got elasticdump installed. https://github.com/taskrabbit/elasticsearch-dump | |
# if not, either run | |
# npm i -g elasticdump | |
# or use npx. | |
export SOURCE_HOST=http://localhost:9200 | |
export DEST_HOST=http://localhost:9201 |