Skip to content

Instantly share code, notes, and snippets.

@stubbornella
stubbornella / media-object.jsx
Created December 18, 2014 15:29
Media Object from OOCSS and now Bootstrap written in React/jsx
'use strict';
var React = require('react/addons');
var _ = require('lodash');
var setClass = React.addons.classSet;
var MediaObject = React.createClass({
render: function () {
var classes = setClass({
'media-left': this.props.horizontalAlignment === 'left',
@carlossg
carlossg / Dockerfile
Created December 17, 2014 19:19
ansible maven
FROM ansible/centos7-ansible:stable
# or, for example, FROM ansible/ubuntu14.04-ansible:stable
RUN yum install -y tar
RUN ansible-galaxy install geerlingguy.java
RUN ansible-galaxy install https://github.com/silpion/ansible-maven.git
# Add playbooks to the Docker image
COPY site.yml /
@nishantmodak
nishantmodak / nginx.conf.default
Last active May 7, 2025 07:58
Default Nginx Conf
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@klepsydra
klepsydra / sync-fail2ban.sh
Last active January 11, 2024 15:11
Block globally reported hack attempts using your local iptables firewall rules
#!/bin/bash
## Update fail2ban iptables with globally known attackers.
## Actually, runs 100% independently now, without needing fail2ban installed.
##
## /etc/cron.daily/sync-fail2ban
##
## Author: Marcos Kobylecki <[email protected]>
## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/
@punkdata
punkdata / cloud-config.yaml
Last active August 8, 2018 06:21
CoreOS cloud-config.yaml Example
#cloud-config
hostname: <your hostname>
ssh_authorized_keys:
- ssh-rsa < your Public SSH key AAAAB3NzaC1... >
coreos:
etcd:
addr: $private_ipv4:4001
@jm42
jm42 / 140.md
Last active December 24, 2019 14:54
140 bytes of PHP code

140 bytes

  • Framework

    • Twitto - A web framework in a tweet.
    • Kernel - A kernel in a tweet.
    • sized140 - Something like a framework in PHP with 6 components of 140 chars.
  • Router

  • mu - A tweet-sized PHP micro-router.
[program:tomcat6]
command=/opt/tomcat6-instance/bin/supervisor-wrapper.sh
@adamlundrigan
adamlundrigan / CryptoTokenServerFactory.php
Last active September 21, 2016 17:59
Satellizer + Apigility (only direct login, no social integration)
<?php
namespace SatellizerServer\Factory;
use Zend\ServiceManager\DelegatorFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
class CryptoTokenServerFactory implements DelegatorFactoryInterface
{
public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback)
{
@saidie
saidie / fluentd.service
Created October 5, 2014 12:32
Fluentd service file for systemd
[Unit]
Description=Fluentd
Documentation=http://www.fluentd.org/
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/fluentd -d /run/fluentd.pid
PIDFile=/run/fluentd.pid
Restart=on-failure
@kajnelissen
kajnelissen / BookingService.php
Last active February 27, 2025 19:32
Constructor Injection in CodeIgniter controllers. Also resolves nested dependencies.
<?php namespace Nelissen\LooseCI\Services;
use Nelissen\LooseCI\Repositories\Room\RoomRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booking\BookingRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booker\BookerRepositoryInterface;
use Nelissen\LooseCI\Models\Room;
use Nelissen\LooseCI\Models\Booker;
use Nelissen\LooseCI\Exceptions\BookingExceedsRoomCapacityException;
/**