This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"github.com/apache/beam/sdks/v2/go/pkg/beam" | |
"github.com/apache/beam/sdks/v2/go/pkg/beam/io/pubsubio" | |
beamLog "github.com/apache/beam/sdks/v2/go/pkg/beam/log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple storage connector plugin to the Parse REST interface. | |
* | |
* Note: the plugin requires jQuery to be linked into the host page. | |
* | |
* THIS PLUGIN IS FOR DEMO PURPOSES ONLY - DON'T USE IN A PRODUCTION | |
* ENVIRONMENT. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails controller concern to enable Devise authentication for ActiveStorage. | |
# Put it in +app/controllers/concerns/blob_authenticatable.rb+ and include it when overriding | |
# +ActiveStorage::BlobsController+ and +ActiveStorage::RepresentationsController+. | |
# | |
# Optional configuration: | |
# | |
# Set the model that includes devise's database_authenticatable. | |
# Defaults to Devise.default_scope which defaults to the first | |
# devise role declared in your routes (usually :user) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
$script = <<SCRIPT | |
set -e | |
set -x | |
cd | |
sudo apt-get update -y | |
sudo apt-get install \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://stackoverflow.com/questions/11273268/script-import-local-csv-in-google-spreadsheet | |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var csvMenuEntries = [{name: "Upload CSV file", functionName: "doGet"}]; | |
ss.addMenu("CSV", csvMenuEntries); | |
} | |
function doGet(e) { | |
var app = UiApp.createApplication().setTitle("Upload CSV to Sheet"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Enter your license key below | |
license_key=XXXXXXXXXXXXXXXXX | |
curl -O -J -L 'https://sendy.co/download/?license=${license_key}' | |
filename=$(basename -- sendy-*.zip) | |
newdir="${filename%.*}" | |
echo ${newdir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var slackTeam = "YOUR_SLACK_TEAM_NAME "; | |
var token = 'YOUR_ADMIN_TEST_TOKEN'; | |
// A test token will suffice. | |
// You can generate one at https://api.slack.com/docs/oauth-test-tokens | |
// Just make sure that the user issuing the test token is an admin. | |
var url = 'https://'+ slackTeam + '.slack.com/api/users.admin.invite'; | |
fetch(url, { | |
method: 'POST', | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AA | |
AB | |
AC | |
AD | |
AE | |
AF | |
AG | |
AH | |
AI | |
AJ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cd /root && fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 | |
test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=64 | |
fio-3.16 | |
Starting 1 process | |
test: Laying out IO file (1 file / 4096MiB) | |
Jobs: 1 (f=1): [m(1)][100.0%][r=15.6MiB/s,w=5433KiB/s][r=4004,w=1358 IOPS][eta 00m:00s] | |
test: (groupid=0, jobs=1): err= 0: pid=11569: Tue Feb 16 14:09:52 2021 | |
read: IOPS=4001, BW=15.6MiB/s (16.4MB/s)(3070MiB/196382msec) | |
bw ( KiB/s): min=15568, max=19176, per=100.00%, avg=16006.79, stdev=170.15, samples=392 | |
iops : min= 3892, max= 4794, avg=4001.70, stdev=42.53, samples=392 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "TODO" | |
task :compare_yml, [:locale1, :locale2] => :environment do |t, args| | |
LOCALE_1 = "config/locales/#{args[:locale1]}.yml" | |
LOCALE_2 = "config/locales/#{args[:locale2]}.yml" | |
require 'yaml' | |
def flatten_keys(hash, prefix="") | |
keys = [] | |
hash.keys.each do |key| |
NewerOlder