function split-csv() {
fn=${1:0:-4};
fe=${1: -4};
split -d -n $2 ${fn}${fe} ${fn}__part_;
for f in ${fn}__part*; do mv $f ${f}${fe}; done;
};
Usage:
// ==UserScript== | |
// @name AWS SSO - Close 'Get Credentials' Modal | |
// @namespace awsapps.com | |
// @version 1.0 | |
// @description Allow escape key to close modal | |
// @author Mike Atlas | |
// @match https://*.awsapps.com/start* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com | |
// ==/UserScript== |
// ==UserScript== | |
// @name AWS SSO - Close 'Get Credentials' Modal | |
// @namespace awsapps.com | |
// @version 1.0 | |
// @description Allow escape key to close modal | |
// @author Mike Atlas | |
// @match https://*.awsapps.com/start* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com | |
// ==/UserScript== |
resource "aws_ecs_task_definition" "user_code_task_def" { | |
family = local.user_code_family | |
container_definitions = jsonencode([ | |
{ | |
"name" : "${local.user_code_family}", | |
"image" : "${local.ecr_repo_image_path}:${local.latest_user_code_tag}", | |
"portMappings" : [ | |
{ | |
"hostPort" : 8001, | |
"protocol" : "tcp", |
{ | |
"taskDefinitionArn": "arn:aws:ecs:us-east-1:0123456789:task-definition/user_code:155", | |
"containerDefinitions": [ | |
{ | |
"name": "user-code-task", | |
"image": "0123456789.dkr.ecr.us-east-1.amazonaws.com/user_code:build-v1.124", | |
"cpu": 0, | |
"portMappings": [ | |
{ | |
"containerPort": 8001, |
FROM python:3.10-slim-bullseye as dagster | |
RUN apt-get update && apt-get upgrade -yqq | |
ENV DAGSTER_HOME=/opt/dagster/dagster_home | |
RUN mkdir -p $DAGSTER_HOME/user_code | |
WORKDIR $DAGSTER_HOME | |
COPY dagster.yaml workspace.yaml $DAGSTER_HOME/ |
function split-csv() {
fn=${1:0:-4};
fe=${1: -4};
split -d -n $2 ${fn}${fe} ${fn}__part_;
for f in ${fn}__part*; do mv $f ${f}${fe}; done;
};
Usage:
brew tap homebrew/versions | |
brew install v8-319 | |
gem install libv8 -v '3.16.14.19' -- --with-system-v8 | |
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-319 | |
bundle install |
Checks if the remote branch is master
, then asks a confirmation. Based on https://gist.github.com/ColCh/9d48693276aac50cac37a9fce23f9bda, but modified to check the remote name instead of local, making it work also for the really dangerous accidents like below:
git push -f origin e09b7418a310114f6aaf495f969c3859095a99af:master
Further info: https://dev.ghost.org/prevent-master-push/, https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook, https://git-scm.com/docs/githooks#_pre_push, https://stackoverflow.com/questions/22585091/git-hooks-pre-push-script-does-not-receive-input-via-stdin
package main | |
import "fmt" | |
func main() { | |
initialBoard := [][]int{ | |
[]int{1, 1, 1, 4}, | |
[]int{1, 1, 2, 4}, | |
[]int{2, 1, 2, 4}, |
{ | |
"window.zoomLevel": -1, | |
"files.associations": { | |
"*.peg": "pegjs" | |
}, | |
"gitlens.advanced.messages": { | |
"suppressCommitHasNoPreviousCommitWarning": false, | |
"suppressCommitNotFoundWarning": false, | |
"suppressFileNotUnderSourceControlWarning": false, | |
"suppressGitVersionWarning": false, |