Skip to content

Instantly share code, notes, and snippets.

View stvvt's full-sized avatar
💭
I may be slow to respond.

Stefan Stefanov stvvt

💭
I may be slow to respond.
View GitHub Profile
@stvvt
stvvt / manage-etc-hosts.sh
Last active September 26, 2018 05:00 — forked from irazasyed/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
set -eu
# PATH TO YOUR HOSTS FILE
: ${ETC_HOSTS="/etc/hosts"}
# DEFAULT IP FOR HOSTNAME
DEFAULT_IP="127.0.0.1"
@stvvt
stvvt / bootstrap_form.php
Created October 12, 2011 07:44 — forked from slywalker/bootstrap_form.php
form helper for CakePHP on twitter bootstrap
<?php
class BootstrapFormHelper extends AppHelper {
public $helpers = array('Html', 'Form');
public function input($name, $options = array()) {
$default = array(
'type' => null,
'label' => null,
'before' => null, // to convert .input-prepend