Skip to content

Instantly share code, notes, and snippets.

@cedvict
cedvict / postman-deb.sh
Created January 19, 2021 21:26 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
ls Postman*.tar.gz > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
fi
curlExists=$(command -v curl)
@cedvict
cedvict / README.md
Created June 8, 2020 07:54 — forked from 1951FDG/README.md
Share on LinkedIn via LinkedIn REST API using PostMan
@cedvict
cedvict / Foreign_key_dependencies_PGSQL.sql
Created December 16, 2019 08:05 — forked from ststeiger/Foreign_key_dependencies_PGSQL.sql
List tables by foreign-key dependencies PostgreSQL (also works on MS-SQL with minor modifications)
DROP TABLE IF EXISTS CTE_AllTables;
-- CREATE TEMPORARY TABLE IF NOT EXISTS CTE_AllTables
CREATE TEMPORARY TABLE CTE_AllTables AS
SELECT
ist.table_schema AS OnTableSchema
,ist.table_name AS OnTableName
,tForeignKeyInformation.FkNullable
-- WARNING: TableSchema or Tablename can contain entry-separator (';' used)
,CAST(DENSE_RANK() OVER (ORDER BY ist.table_schema, ist.table_name) AS varchar(20)) AS OnTableId
@cedvict
cedvict / docker-compose.yml
Created October 3, 2019 16:55 — forked from ShakataGaNai/docker-compose.yml
Docker Compose for GitLab EE
gitlab:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.mycompany.tld'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.mycompany.tld'
# https://docs.gitlab.com/omnibus/settings/ssl.html
letsencrypt['enable'] = true
letsencrypt['auto_renew'] = true
@cedvict
cedvict / daily.sh
Created February 21, 2019 17:04 — forked from robertsosinski/daily.sh
PostgreSQL Backup Scripts
#!/bin/bash
filepath="/data/postgresql/9.1/main-backups"
cd $filepath
for database in `ls $filepath/daily`; do
filename=`date +"$filepath/daily/$database/$database-daily-%w-%a.dmp" | tr '[:upper:]' '[:lower:]'`
if [ -e $filename ]; then
@cedvict
cedvict / pgsql_backup.sh
Created February 21, 2019 17:01 — forked from dangerousbeans/pgsql_backup.sh
Database backup script (pgsql)
FILE=`date +"%Y%m%d"`_backup.sql
DBSERVER=127.0.0.1
DATABASE=
USER=postgres
PASS=
# (2) in case you run this twice in one day, remove the previous version of the file
unalias rm 2> /dev/null
rm ${FILE} 2> /dev/null
rm ${FILE}.gz 2> /dev/null
@cedvict
cedvict / docker-compose.yaml
Created October 19, 2018 11:44 — forked from alpham/docker-compose.yaml
docker compose file to run odoo 11
version: "3"
services:
db:
image: postgres:9.4
deploy:
replicas: 1
volumes:
- pgsql_data:/var/lib/postgresql/data:rw,Z
environment:
@cedvict
cedvict / make.sh
Created August 22, 2018 08:06 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"