Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
description "service" | |
start on filesystem | |
stop on runlevel S | |
respawn | |
respawn limit 10 5 | |
oom never | |
kill timeout 86400 #If it's given a stop order, this is how long it will take to stop. |
#!/bin/sh | |
# set the configuration variables below, before running the script | |
# get the solr nightly build download link from https://builds.apache.org/job/Solr-Artifacts-4.x/lastSuccessfulBuild/artifact/solr/package/ | |
JETTY_URL="http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.0.5.v20130815.tar.gz&r=1" | |
JETTY_HOME="/opt/jetty" | |
JAVA='/usr/local/jdk1.7.0_09/bin/java' | |
JETTY_PORT=8085 | |
JETTY_HOST=127.0.0.1 |
// Usage example... | |
HttpsURLConnection connection = (HttpsURLConnection) new URL("https://someurl.com").openConnection(); | |
connection.setSSLSocketFactory(buildSslSocketFactory()); | |
private static SSLSocketFactory buildSslSocketFactory(Context context) { | |
// Add support for self-signed (local) SSL certificates | |
// Based on http://developer.android.com/training/articles/security-ssl.html#UnknownCa | |
try { | |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
awk '/^(\S+) \S+ \S+ \[([^\]]+)\] "([A-Z]+)[^"]*" \d+ \d+ "[^"]*" "([^"]*)"$/m ($6 == "\"GET") && ($9 == 200) && !($7 ~ /^\/_analytics/) && !($7 ~ /^\/arama/) && !($7 ~ /^\/programlar\?q/) && !($7 ~ /^\/uzmanlar\?search/) && !($7 ~ /^\/app\/vplayer\/getsibling.tv/) {print $7}' access.log | uniq > access_log_filtered.log |
<html> | |
<head> | |
<style type="text/css"> | |
table table { | |
width: 600px !important; | |
} | |
table div + div { /* main content */ | |
width: 65%; | |
float: left; | |
} |
I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.
I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.
#!/usr/bin/env python | |
import sys | |
import os | |
import json | |
import argparse | |
import collections | |
__description__ = """Ansible Dynamic Inventory for Terraform.""" | |
__epilog__ = """ |
kops: https://github.com/kubernetes/kops
Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md
Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/
Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/
Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/
Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/
Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/
Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/
Tectonic (Terraform): http://github.com/coreos/tectonic-installer
Graphical installer: https://coreos.com/tectonic/docs/latest/install/aws/