Skip to content

Instantly share code, notes, and snippets.

ainsofs / .bashrc
Created August 8, 2023 22:09
Bash aliases
View .bashrc
# docker alias'
alias dlup='docker compose up -d; docker compose logs -f php'
alias dup='docker compose up -d'
alias dstop='docker compose stop'
alias dphp='docker compose exec php bash'
alias dnode='docker compose exec node bash'
alias dq="docker compose exec quasar bash"
alias dlphp='docker compose logs -f php'
alias dlnode='docker compose logs -f node'
alias dlq='docker compose logs -f quasar'
ainsofs /
Last active August 7, 2023 23:25
User requirements template

002 - Some Title

Brief sentence or two.

Primary Actor



ainsofs / check.txt
Created April 23, 2023 23:07
Check which process is using a port and show details
View check.txt
# display all processes running on port 80
netstat -aon | findstr 0.0:80
# diplay the process details
tasklist /FI "PID eq 18748"
ainsofs / table-size.sql
Created July 26, 2022 21:13
Get table sizes on Ms SQL
View table-size.sql
-- DROP TABLE #tmpTableSizes
CREATE TABLE #tmpTableSizes
tableName varchar(100),
numberofRows varchar(100),
reservedSize varchar(50),
dataSize varchar(50),
indexSize varchar(50),
unusedSize varchar(50)
ainsofs / boilerplate.vue3
Last active June 23, 2022 05:49
Vue3 Component template and snippet for vscode
View boilerplate.vue3
<script setup>
import { ref, computed } from 'vue'
// props and emits
const props = defineProps(['someProp'])
ainsofs / settings.local.php
Created June 19, 2022 20:59
Redirect script that can be used in wodby environment
View settings.local.php
# redirect from multiple domains to your primary domain
if (isset($_SERVER['WODBY_ENVIRONMENT_TYPE']) && $_SERVER['WODBY_ENVIRONMENT_TYPE'] == 'prod' && php_sapi_name() != "cli") {
$redirect_from = array(
if (in_array($_SERVER['HTTP_HOST'], $redirect_from)) {
header('HTTP/1.0 301 Moved Permanently');
View kubernetes_commands.txt
# show all pods
kubectl get pods --all-namespaces
# get pod info
kubectl -n {uuid} describe pods {container_name}
# delete pod
kubectl -n {uuid} delete pods -lname={container_name}
# view pod log
ainsofs /
Last active February 10, 2021 22:23
mount / unmount volumes in linux
# list volumes
sudo fdisk -l
# create a mount location
mkdir -p /mnt/some-vol
# mount
mount /dev/xvdf /mnt/some-vol
# unmount
ainsofs / add_https.bat
Last active November 24, 2020 21:51
Use this snippet to add https to an IIS7 site
View add_https.bat
appcmd set site /"<IISSiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<hostHeaderValue>']
ainsofs / template.yml
Created September 16, 2020 04:07
custom wodby stack - IPT
View template.yml
type: drupal8
infrastructure: ^5.1
enabled: true
required: true
image: 'gbif/ipt:2.4.2'
- 'edge::80:8080/tcp'