Skip to content

Instantly share code, notes, and snippets.

@SpivEgin
SpivEgin / states_hash.json
Created November 20, 2020 07:54 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Content-Security-Policy</title>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' data: gap: 'unsafe-eval' ws: ;
style-src 'self' 'unsafe-inline';
script-src https: *.example.com ;
@SpivEgin
SpivEgin / .gitconfig
Created August 1, 2017 15:01 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@SpivEgin
SpivEgin / .gitconfig
Created August 1, 2017 15:01 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@SpivEgin
SpivEgin / Django CMS Migration Query
Created May 4, 2017 02:20 — forked from soldnermike/Django CMS Migration Query
Query to get Django CMS pages into a CSV file to import into WordPress.
-- manifest of all entities
SELECT *
FROM "cms_title"
INNER JOIN "cms_page"
ON (
"cms_title"."page_id" = "cms_page"."id")
INNER JOIN "django_site"
ON (
"cms_page"."site_id" = "django_site"."id"
)
@SpivEgin
SpivEgin / pagekit.conf
Created April 24, 2017 20:41 — forked from DarrylDias/pagekit.conf
NGINX config for PageKit. (Tested on Ubuntu) (If for some reason I don't reply to a comment leave a message at https://darryldias.me/contact/)
server {
# Server name
server_name example.com;
# Server Port
listen 80;
# Webroot
root /var/www/;
vagrant up
vagrant ssh -c "curl -L https://github.com/{your-username}.keys >> /home/vagrant/.ssh/authorized_keys"
@SpivEgin
SpivEgin / debian-lamp.yml
Created November 6, 2016 16:53 — forked from briceburg/debian-lamp.yml
automated [ansible] debian lamp server setup
---
# based on https://gist.github.com/briceburg/ded5e82a70e5af71a611
- name: common utilities
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
@SpivEgin
SpivEgin / service-checklist.md
Created November 6, 2016 16:26 — forked from marktheunissen/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@SpivEgin
SpivEgin / pedantically_commented_playbook.yml
Created November 6, 2016 16:22 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.