Skip to content

Instantly share code, notes, and snippets.

package com.smeet.cassandra;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import org.apache.cassandra.db.CompactionManager;
import org.apache.cassandra.db.CompactionManagerMBean;
import org.apache.cassandra.service.StorageProxyMBean;
import org.apache.cassandra.service.StorageServiceMBean;
@higebu
higebu / cassandra_zabbix_template.xml
Created June 6, 2012 05:46
Zabbix Template for Cassandra
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2012-05-14T12:36:06Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@lost-theory
lost-theory / gist:3925738
Created October 21, 2012 04:29
different delimiters in jinja2 + flask
from flask import Flask, render_template_string, request
class CustomFlask(Flask):
jinja_options = Flask.jinja_options.copy()
jinja_options.update(dict(
block_start_string='<%',
block_end_string='%>',
variable_start_string='%%',
variable_end_string='%%',
comment_start_string='<#',
@arslnb
arslnb / get_access_token.py
Created November 14, 2012 11:55
Python Wrapper around Twitter API
import os
import sys
try:
from urlparse import parse_qsl
except:
from cgi import parse_qsl
import oauth2 as oauth
@JosefJezek
JosefJezek / how-to-use-pelican.md
Last active April 28, 2024 20:18
How to use Pelican on GitHub Pages
---
title: "IS 609 Homework 4"
author: "Aaron Palumbo"
date: "Saturday, September 20, 2014"
output: pdf_document
---
Homework 4:
## Page 191: #3
@dubravkoL
dubravkoL / htmlTags.html
Last active March 14, 2018 14:19
HEAD html - Must-Have Social Meta Tags for Twitter, Google+, Facebook and More
<head>
<!--///////// Minimum Social Media Tag Template: Article //////////-->
<!-- Place this data between the <head> tags of your website -->
<title>Page Title. Maximum length 60-70 characters</title>
<meta name="description" content="Page description. No longer than 155 characters." />
@subsetpark
subsetpark / gist:367f0d3fde503a1e481c
Created June 16, 2015 15:48
Building Python 2.7.10 on Ubuntu 14.04 LTS
$ sudo apt-get install -y gcc-multilib g++-multilib libffi-dev libffi6 libffi6-dbg python-crypto python-mox3 python-pil python-ply libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libgdbm-dev dpkg-dev quilt autotools-dev libreadline-dev libtinfo-dev libncursesw5-dev tk-dev blt-dev libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libsqlite3-dev libgpm2 mime-support netbase net-tools bzip2
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar xvf Python-2.7.10.tgz
$ cd Python-2.7.10/
$ ./configure --prefix /usr/local/lib/python2.7.10 --enable-ipv6
$ make
$ sudo make install
@pottava
pottava / docker-swarm-on-aws.sh
Last active April 17, 2017 20:18
Docker Swarm on AWS Multiple AZ
#!/bin/sh
# Create consul container
export AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY
export AWS_DEFAULT_REGION=ap-northeast-1
export AWS_ZONE=a
export AWS_SUBNET_ID
export AWS_INSTANCE_TYPE=c4.large