Skip to content

Instantly share code, notes, and snippets.

View gembin's full-sized avatar
🎯
Focusing

gembin

🎯
Focusing
  • Seattle, WA
View GitHub Profile
@gembin
gembin / redis-server
Last active December 15, 2015 20:41 — forked from tessro/redis-server
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
data:text/html,
<style type="text/css">
#e {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
font-size:16px;
}
apply plugin: "java"
apply plugin: "eclipse"
repositories {
mavenCentral()
}
dependencies {
compile (
"org.jboss.netty:netty:latest.integration",
package jd.plugins.hoster;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
#!/bin/bash
#
# Tomcat 7 start/stop/status script
# Forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash@miglen.com>
#
# Release updates:
# Updated method for gathering pid of the current proccess
# Added usage of CATALINA_BASE
# Added coloring and additional status
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@gembin
gembin / pom.xml
Created December 11, 2013 09:09 — forked from nicoulaj/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Benchmark code goes into src/test/java -->
<dependencies>
<dependency>
public class NettyHttpServerSocketOptions extends NettyServerSocketOptions {
@Override
public final Consumer<ChannelPipeline> pipelineConfigurer() {
return new Consumer<ChannelPipeline>() {
@Override
public void accept(ChannelPipeline pipeline) {
pipeline.addLast(new HttpRequestDecoder());
pipeline.addLast(new HttpObjectAggregator(Integer.MAX_VALUE));
pipeline.addLast(new HttpResponseEncoder());
}
@gembin
gembin / gulpfile.js
Created January 13, 2016 17:06 — forked from balthazar/gulpfile.js
gulp-rev-all mockup
var gulp = require('gulp');
var rev = require('gulp-rev-all');
var css = require('gulp-minify-css');
var img = require('gulp-imagemin');
var rs = require('run-sequence');
var del = require('del');
gulp.task('image', function () {
return gulp.src('image.jpeg')
.pipe(img({ progressive: false }))
@gembin
gembin / pedantically_commented_playbook.yml
Created February 1, 2016 18:12 — 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.