Skip to content

Instantly share code, notes, and snippets.

View gravcat's full-sized avatar

poppoppop gravcat

View GitHub Profile
@cloudbitvps
cloudbitvps / install-docker.md
Created January 21, 2018 07:50 — forked from zulhfreelancer/install-docker.md
Install Docker oneliner script

Just install Docker

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Install Docker and Rancher Server

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

@hybridjosto
hybridjosto / Cricket data.py
Last active August 6, 2018 11:22
scraping data from a web table using python and Beautiful Soup
import urllib2
from bs4 import BeautifulSoup
# http://segfault.in/2010/07/parsing-html-table-in-python-with-beautifulsoup/
f = open('cricket-data.txt','w')
linksFile = open("linksSource.txt")
lines = list(linksFile.readlines())
for i in lines[12:108]: #12:108
url = "http://www.gunnercricket.com/"+str(i)
try:
@andrenarchy
andrenarchy / stellar-testnet.yml
Last active August 21, 2018 23:56
Stellar Core and Horizon with docker-compose
version: '3'
services:
postgres-core:
image: postgres:9
volumes:
- "/var/stellar-data-testnet/postgres-core:/var/lib/postgresql/data"
environment:
- POSTGRES_DB=stellar-core
stellar-core:
image: stellar-core
- name: copy updated files to ghost directory
synchronize: src={{ item.src }} dest={{ item.dest }} checksum=yes times=no
with_fileglob:
- { src: '{{ ghost_dir_new }}/*.js', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/*.json', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/*.md', dest: '{{ ghost_dir_current }}' }
- { src: '{{ ghost_dir_new }}/core', dest: '{{ ghost_dir_current }}' }
- { src: '"{{ ghost_dir_new }}/{{ theme_dir }}"', dest: '"{{ ghost_dir_current }}/{{ theme_dir }}"' }
delegate_to: "{{ inventory_hostname }}"
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@solarce
solarce / ec2.tf
Last active February 4, 2022 04:04
terraform.io example template for ec2 instance with tags
# The various ${var.foo} come from variables.tf
# Specify the provider and access details
provider "aws" {
region = "${var.aws_region}"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
}
@joshgerdes
joshgerdes / Wanhao_Cura_Profile16.ini
Last active March 31, 2022 17:01
Monoprice Maker Select Plus (Wanhao i3 Plus) Setup
[profile]
layer_height = 0.16
wall_thickness = 1.2
retraction_enable = True
solid_layer_thickness = 1.2
fill_density = 10
nozzle_size = 0.4
print_speed = 50
print_temperature = 200
print_temperature2 = 0
@alastairtree
alastairtree / gist:6777218c2c7facc17282
Created July 28, 2014 14:45
grant read execute permissions to a folder via powershell
$path = "C:\Sites\Website123"
$user = "domain\user"
$acl = Get-Acl $path
$arguments = $user, "ReadAndExecute", "ContainerInherit, ObjectInherit", "None", "Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments
$acl.SetAccessRule($accessRule)
@blues-man
blues-man / selinux_policy_timedated.txt
Last active June 1, 2022 08:42
SELinux blocks timedatectl to update timezone, SELinux script to unblock it
# timedatectl set-timezone Europe/Berlin
Failed to set time zone: Access denied
# grep denied /var/log/audit/audit.log
type=AVC msg=audit(1530808024.058:35494): avc: denied { unlink } for pid=32035 comm="systemd-timedat" name="localtime" dev="vda1" ino=74 scontext=system_u:system_r:systemd_timedated_t:s0 tcontext=system_u:object_r:etc_t:s0 tclass=lnk_file
# cat /var/log/audit/audit.log | audit2allow -M timezone
#============= systemd_timedated_t ==============
@k0nsl
k0nsl / A - Information
Created March 29, 2017 14:03 — forked from doonga/A - Information
Plex NGINX reverse proxy config using Cloudflare on Ubuntu 16.04
Credit where credit's due, I mainly used these 3 resources to get this all working. There were several others but I don't exactly remember which is which. So at least here are the 3 main places that I used.
The vast majority of this came from this link, the others helped me make it work for Plex.
http://emby.media/community/index.php?/topic/30975-reverse-proxy-with-ssl-hostname-routing-and-embyopenvpn-port-sharing/
https://gist.github.com/spikegrobstein/4384954
https://forums.plex.tv/discussion/207725/ubuntu-14-04-4-lts-plex-incorrectly-handles-lower-case-headers#latest
The data flow here is: