Skip to content

Instantly share code, notes, and snippets.

View JSONOrona's full-sized avatar

Jason Orona JSONOrona

View GitHub Profile
@HonbraDev
HonbraDev / remove.sh
Last active June 17, 2024 21:09
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons

ChefDK, Test Kitchen Driven NTP Cookbook

This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04 and CentOS 6.4 (and derviatives) and the attribute file is used to support both distros.

This should work on Mac (where I developed it) and any chef-supported Linux that you can get Vagrant onto (Ubuntu/CentOS).

Because I use ChefDK and Test Kitchen, I can largely ignore setting up Vagrant and Berkshelf and can get right to work on writing recipe code.

NOTE: Modern (7/6/2014) Recipe Generation

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active June 28, 2024 10:38
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@zwacky
zwacky / bash-custom-prompt.sh
Created March 1, 2014 14:01
beautified bash custom prompt
# add to ~/.bashrc
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '
@rgsingh
rgsingh / Simple pull request work flow
Last active August 28, 2017 17:08
Establish a simple workflow for managing pull pull requests
# Fork a repository (owned by someone else usually. In this case, fordprefect forked from rgsingh)
git clone https://github.com/fordprefect/feature-dev-demo.git
# Establish an upstream so that your fork can keep in sync with the original repo.
cd feature-dev-demo
git remote add upstream https://github.com/th-js-meetup/feature-dev-demo.git
# Pull down all of the deltas from the original repo via upstream
git fetch upstream
@JSONOrona
JSONOrona / parser.py
Last active January 4, 2021 16:37
Python command line argument example using argparse module
#!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
@bcap
bcap / start-stop-daemon-template
Last active July 21, 2023 11:12
Template file for creating linux services out of executables using the start-stop-daemon
#!/bin/bash
### BEGIN INIT INFO
# Provides: <service name>
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: <service description>
### END INIT INFO
@kevinkarwaski
kevinkarwaski / multi_env_knife_config
Created February 18, 2012 19:06
Knife config for Multiple Chef Environments
#
# This is an example of a knife.rb configuration that uses yml and a
# simple env var (CHEF_ENV) to manage multiple hosted Chef environments.
#
# Example usage:
# export CHEF_ENV=evnironment_01
# knife status
#
# Based on: http://blog.blankpad.net/2010/09/28/multiple-knife-environments---the-return/
#