Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)
$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
""" | |
Craft a web request to the AWS rest API and hit an endpoint that actually works but isn't supported in the CLI or in Boto3. | |
Based on this: https://github.com/aws/aws-cli/issues/2268#issuecomment-373803942 | |
""" | |
import boto3 | |
import os | |
import sys, os, base64, datetime, hashlib, hmac, urllib | |
import requests |
# NB! not for production! | |
# https://docs.docker.com/engine/reference/builder/#arg | |
# Warning: It is not recommended to use build-time variables for passing secrets like github keys, user credentials etc. Build-time variable values are visible to any user of the image with the docker history command. | |
FROM golang:1.13 as builder | |
# This argument should be defined as your personal access tokens, from: https://github.com/settings/tokens | |
ARG GITHUB_ACCESS_TOKEN | |
# Any kind of configurations: | |
ENV GO111MODULE=on |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
package fans | |
// this code was inspired by https://talks.golang.org/2012/concurrency.slide#36 | |
// | |
// it uses the context package (which wasn't available when that presentation was made) instead of a timer to | |
// do timeouts | |
import ( | |
"context" | |
"time" |
import java.io.ByteArrayOutputStream | |
import java.io.File | |
import java.nio.charset.StandardCharsets.UTF_8 | |
import java.util.zip.GZIPInputStream | |
import java.util.zip.GZIPOutputStream | |
fun gzip(content: String): ByteArray { | |
val bos = ByteArrayOutputStream() | |
GZIPOutputStream(bos).bufferedWriter(UTF_8).use { it.write(content) } | |
return bos.toByteArray() |
-- 100 million INSERTs benchmark | |
-- stock PostgreSQL 9.6 setup running on an Ubuntu 16.04 workstation | |
-- PK TYPE INSERT* time (ms) Relative time AVG throughput (op/s) | |
------------------------------------------------------------------------ | |
-- BIGSERIAL 242,849.46 1.00 411,777.73 | |
-- UUID COMB 337,028.15 1.39 296,711.12 | |
-- UUID 1 470,385.37 1.94 212,591.65 | |
-- UUID 4 7,808,502.45 32.15 12,806.55 | |
------------------------------------------------------------------------ |
cd /Library/Preferences
sudo rm com.sophos.sav.plist
--or--
sudo rm com.sophos.*
cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer --force_remove
Sometimes the Sophos virus can exist in the /Library/Application.../Sophos/saas folder
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
"net/http" | |
"os" |