Skip to content

Instantly share code, notes, and snippets.

View marcostolosa's full-sized avatar
👽
Memento Mori.

Marcos 'Tr0p' Tolosa marcostolosa

👽
Memento Mori.
View GitHub Profile
@marcostolosa
marcostolosa / .conkyrc
Created January 21, 2019 17:10
Manjaro Conky Config
background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
out_to_console no
own_window yes
own_window_argb_visual true
own_window_transparent yes
@marcostolosa
marcostolosa / k8-install.sh
Created February 8, 2019 14:07
Minikube with KVM - Ubuntu 18.04
#!/bin/bash
# Config: ~/.minikube/machines/minikube/config.json
# kubectl config view
### Installing QEMU/KVM
apt install -y qemu-kvm libvirt-bin virt-top libguestfs-tools virtinst bridge-utils
modprobe vhost_net
lsmod | grep vhost
echo "vhost_net" | tee -a /etc/modules
@marcostolosa
marcostolosa / wp.sh
Created March 13, 2019 16:16 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@marcostolosa
marcostolosa / nginx.conf
Last active April 16, 2019 13:13 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
worker_processes 2;
events {
worker_connections 1024;
}
upstream app {
server 127.0.0.1:5000 fail_timeout=0;
}
@marcostolosa
marcostolosa / read-access.sql
Created April 16, 2019 12:51 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
@marcostolosa
marcostolosa / sonar-scanner.properties
Created April 17, 2019 09:43
Example of **/sonar-scanner/conf/sonar-scanner.properties**
#No information about specific project should appear here
#----- Default SonarQube server
sonar.host.url=http://localhost:9000
sonar.projectKey=
sonar.projectName=
sonar.projectVersion=1.0
sonar.sources=/home/<user>/Codes/blockchain-py
sonar.language=py
@marcostolosa
marcostolosa / CloudFlare-API.md
Last active September 29, 2025 13:34
Cloudflare API - Using Cloudflare’s API, you can do just about anything you can do on cloudflare.com via the customer dashboard.

Cloudflare's API Cheat-Sheet

VARIABLE VALUE
EMAIL The email address associated with your Cloudflare account.
KEY The global API key associated with your Cloudflare account.
DOMAIN The name of the domain to create a zone record for.
JUMP_START If true, automatically attempts to fetch existing DNS records when creating a domain’s zone record
ZONE_ID The unique ID of the domain’s zone record. Assigned by Cloudflare. Required when managing an existing zone record and its DNS records.
@marcostolosa
marcostolosa / cleanCache.sh
Created April 18, 2019 13:13
A sample shell script created to clean up cached files from lighttpd web server every 10 days. This script is directly created at /etc/cron.daliy/ directory.
```
#!/bin/bash
CROOT="/tmp/cachelighttpd/"
# Clean files every $DAYS
DAYS=10
# Web server username and group name
LUSER="lighttpd"
LGROUP="lighttpd"
@marcostolosa
marcostolosa / addCron.md
Last active April 18, 2019 13:25
Create a Cron Job Using Bash (Shell Script) Automatically Without Interactive Editor

Adding a Cron Job via Shell Script

#write out current crontab
crontab -l > mycron

#echo new cron into cron file
echo "00 09 * * 1-5 echo hello" >> mycron

#install new cron file
@marcostolosa
marcostolosa / ysvc.txt
Created September 22, 2019 13:56
Yaourt skip validity checks
yaourt --m-arg "--skippgpcheck" -S {{ package }}
###
--skipinteg
Do not perform any integrity checks (checksum and PGP)
on source files.
--skipchecksums
Do not verify checksums of source files.