Skip to content

Instantly share code, notes, and snippets.

@frntn
frntn / gist:f25726df962fc29c6dde
Last active July 14, 2024 15:15
azure-cli cheatsheet
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment
<!-- http POST data with cli -->
{
"HostConfig": {
"RestartPolicy": {
"MaximumRetryCount": 0,
"Name": ""
},
"NetworkMode": "bridge",
"SecurityOpt": null,
"VolumesFrom": null,
@frntn
frntn / gcloud_commands
Last active February 27, 2024 11:10
all gcloud commands
gcloud auth
gcloud auth activate-refresh-token
gcloud auth activate-service-account
gcloud auth git-helper
gcloud auth list
gcloud auth login
gcloud auth print-access-token
gcloud auth print-refresh-token
gcloud auth revoke
gcloud components
@frntn
frntn / ohmyzsh
Created May 7, 2014 08:11
What happen when installing oh-my-zsh configuration without having zsh installed ( => should add a check if shell is installed )
root@precise32:~# curl -L http://install.ohmyz.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 104 100 104 0 0 159 0 --:--:-- --:--:-- --:--:-- 650
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 1779 100 1779 0 0 1119 0 0:00:01 0:00:01 --:--:-- 42357
Cloning Oh My Zsh...
Cloning into '/root/.oh-my-zsh'...
remote: Reusing existing pack: 10071, done.
Receiving objects: 100% (10071/10071), 2.04 MiB | 500 KiB/s, done.
@frntn
frntn / pipe_stderr_only.sh
Created May 6, 2014 17:23
Proof of Concept : Pipe (and color output for proof) of stderr only
#!/bin/bash
function outerr {
echo "this is on standard ouput (blank color)"
echo "but this one is on error ouput (red color)" >&2
}
exec 3>&1
outerr 2>&1 >&3 | sed -e 's/^/'$(printf "\033[1;31m")'/' -e 's/$/'$(printf "\033[39m")'/'
exec 3>&-
@frntn
frntn / .screenrc
Created October 8, 2012 08:53
A simple screenrc with tabs & login shell
hardstatus alwayslastline
hardstatus string '%{Yk}%-w%{.Yk}%n %t%{-}%+w %=%{.w} %{kY}%C'
shell -$SHELL
deflogin on
backtick 1 5 5 uptime
bind f eval "caption splitonly" "hardstatus ignore"
bind F eval "caption always" "hardstatus alwayslastline"
#defscrollback 12000
#bind ^j focus down