Skip to content

Instantly share code, notes, and snippets.

@pal
pal / index.html
Created December 7, 2023 14:00
simple table test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 3 Inlined</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container">
@pal
pal / part1.md
Last active October 19, 2020 20:46 — forked from vlandham/part1.md
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how I use feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on main

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout main

Keybase proof

I hereby claim:

  • I am pal on github.
  • I am brattberg (https://keybase.io/brattberg) on keybase.
  • I have a public key whose fingerprint is B7FB 5585 628E 6B60 BCE6 C110 9523 73B4 7AAA 4E32

To claim this, I am signing this object:

@pal
pal / Brewfile
Last active November 27, 2022 00:32
sh <(curl -sL https://goo.gl/2FSNYE)
tap "caskroom/cask"
tap "caskroom/fonts"
tap "caskroom/versions"
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/dupes"
tap 'caskroom/cask'
tap 'caskroom/fonts'
tap 'caskroom/versions'
tap 'homebrew/bundle'
@pal
pal / set_longer_sudoers_timeout.sh
Last active August 29, 2015 14:18
Edit /etc/sudoers from script to add increased timeout (for running kitchen plan provision, tip from https://github.com/pliljenberg/kitchenplan-config)
#!/bin/sh
# Code from http://stackoverflow.com/a/3706774/697243
if [ -z "$1" ]; then
export EDITOR=$0 && sudo -E visudo
else
cat $1 | sed 's/env_reset.*$/env_reset,timestamp_timeout=30/' >> $1
echo "Changed sudoers to increase timeout"
fi
@pal
pal / graphite-functions
Created March 2, 2014 07:21
Some Graphite code
# Good tips here!
# http://obfuscurity.com/2012/04/Unhelpful-Graphite-Tip-1
# graph recent deploys (green = good, red = ouch)
drawAsInfinite(color(jenkins.builds.*.success.duration,"green"))
drawAsInfinite(color(jenkins.builds.*.failure.duration,"red"))
# How many successful/failed builds / day?
color(summarize(sumSeries(group(jenkins.builds.*.success)), "1d"),"green")
color(summarize(sumSeries(group(jenkins.builds.*.failure)), "1d"),"red")
@pal
pal / bootstrap-carousel-slide.js
Created March 6, 2013 07:37
bootstrap-carousel-slide.js with fix for IE
@pal
pal / schema.xml
Created November 11, 2011 13:28
My schema.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@pal
pal / organize_pictures.sh
Created March 20, 2011 21:16
All-in-one script for organizing my massive amount of images. Still not stream-lined for images sans EXIF data and movies.
#!/bin/sh
# Complete script for organizing pictures and removing duplicates
# Setup some constants
SRC_DIR=${1:-"$HOME/Pictures"} # defaults to "$HOME/Pictures" or file argument
DEST_DIR="$HOME/Backuped/originals/pictures"
# use exiftool to organize all pictures, yay!
# http://www.sno.phy.queensu.ca/~phil/exiftool/
@pal
pal / remove_duplicates.sh
Created March 20, 2011 18:02
Removes duplicate files (found using SHA1 checksum)
#!/bin/bash
# Used in an Automator action that is run as a Image Capture Plugin after file organization
#Delete duplicate files starting at $1 recursive
SRC_DIR=${1:-"$HOME/Backuped/originals/pictures"} # defaults to "$HOME/Backuped/originals/pictures"
temp_file="/tmp/fl$$" # $$ is process ID
find "$SRC_DIR" -type f -exec shasum {} \; | sort -r > $temp_file
# use substr($0, index($0, " ")); instead of $2 to handle filenames with spaces