title | description | author | created | updated | ||
---|---|---|---|---|---|---|
{{title}} |
{{description}} |
{{author}} |
|
|
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
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
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
#!/bin/bash | |
#upgrade chromeos debian stretch to buster (for python 3.7) | |
#https://www.reddit.com/r/Crostini/comments/9rhauo/upgrade_from_stretch_to_buster_compilation_of/ | |
#Fresh Stretch install. Let's make sure everything is up to date. | |
sudo apt-get update | |
sudo apt-get -y --allow-downgrades upgrade | |
sudo apt-get -y dist-upgrade | |
#Update package repository to Buster |
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
# Replace "projectname" and "username" | |
image: golang:1.9 | |
variables: | |
BIN_NAME: projectname | |
ARTIFACTS_DIR: artifacts | |
GO_PROJECT: gitlab.com/username/projectname | |
stages: | |
- build |
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
#!/bin/bash | |
# | |
# Setup: | |
# wget https://github.com/restic/restic/releases/download/v0.7.3/restic_0.7.3_linux_amd64.bz2 | |
# bunzip2 restic_0.7.3_linux_amd64.bz2 | |
# mv restic_0.7.3_linux_amd64 /usr/local/bin/restic | |
# chmod a+x /usr/local/bin/restic | |
# | |
# crontab -e | |
# 0 1 * * * /root/bin/restic-backup.sh 2>&1 >>/var/log/restic-backup.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
<%= f.InputTag("Title") %> | |
<%= f.TextArea("Body", {rows: 10}) %> | |
<div id="body-preview"></div> | |
<button class="btn btn-success" role="submit">Save</button> |
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
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |
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
image: golang:1.7 | |
stages: | |
- build | |
- test | |
before_script: | |
- go get github.com/tools/godep | |
- cp -r /builds/user /go/src/github.com/user/ | |
- cd /go/src/github.com/user/repo |
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
#pull a base64 encoded files out of a kubernetes json secret | |
oc get secrets/broker-client-secret -o json | jq -r '.data."client.ts"' | base64 -d > client.ts | |
oc get secrets/broker-server-secret -o json | jq -r '.data."broker.ks"' | base64 -d > broker.ks | |
oc get secrets/broker-server-secret -o json | jq -r '.data."broker.ts"' | base64 -d > broker.ts | |
#replace base64 content in a secret - and save to file | |
THINGY=$(base64 newbroker.ks) | |
oc get secrets/il3-broker-server-secret -o json | jq -r --arg THINGY $THINGY '.data."broker.ks" = $THINGY' > my-new-secret.json |
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
/* | |
https://www.youtube.com/watch?v=iOGIKG3EptI | |
https://github.com/awslabs/aws-go-wordfreq-sample/blob/master/cmd/uploads3/main.go | |
https://docs.aws.amazon.com/sdk-for-go/api/aws/ | |
- first configure your aws credentials run: aws configure | |
- go get -u github.com/aws/aws-sdk-go/aws | |
- login to UI web aws s3 interface | |
- go to S3 service |
NewerOlder