Skip to content

Instantly share code, notes, and snippets.

View josephdpurcell's full-sized avatar

Joseph D. Purcell josephdpurcell

View GitHub Profile
@mcdwayne
mcdwayne / Drupal-9-module-checker.sh
Last active March 25, 2019 12:26
a little script to ask you for a module name to install, check and give you hash in one step, per Joe Purcell's process: https://docs.google.com/document/d/1UnVzmQhCv9_IT0-u-tjvWPDR-QQAU31ij2iKkio8U3U
#!/bin/bash
## Author: mcdwayne
## Created to support this project doc:
## https://docs.google.com/document/d/1UnVzmQhCv9_IT0-u-tjvWPDR-QQAU31ij2iKkio8U3U/edit#
##
## Made at MidCamp 2019
# Ask for the module's machine name
# this is found in the module URL.
@duleorlovic
duleorlovic / a quick way to deploy ruby on rails on vagrant.md
Last active June 23, 2020 20:20
Quickly deploy any Ruby on Rails application to VirtualBox using Vagrant or to any other provider of Linux machine just running this shell script

Deploy Ruby on Rails

You can use those bootstrap script to deploy your Rails application to Virtualbox. It's not intended to replace Chef or Puppet, but since its plain bash, its very readable and you can copy some lines and paste to your ssh session...

How to use

After installing Vagrant software run vagrant init and edit your Vagrantfile

@bonsaiviking
bonsaiviking / NmapHeartbleed.md
Last active September 20, 2021 23:31
Guide to using Nmap to scan for the Heartbleed bug.

Requirements

  1. Nmap. The script requires version 6.25 or newer. The latest version, 6.47, already includes the next 3 dependencies, so you can skip directly to the Scanning section below.
    • An easy way to get the latest Nmap release is to use Kali Linux.
    • Binary installers are available for Windows.
    • RPM installer available for Linux, or install from source.
    • .dmg installer available for Mac OS X.
  2. tls.lua. The script requires this Lua library for TLS handshaking.
  3. ssl-heartbleed.nse. This is the script itself.
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

Install MAMP Development stack on Mountain Lion using MacPorts

NOTE: I like to prepend some of the commands with time just for curiosity’s sake to see how long it takes.

Turn off the built-in Apache

Go to System Preferences -> Sharing -> uncheck the Personal Web sharing. You will never turn Apache on/off here again.

Install Xcode via Mac App Store

@acg
acg / tsv2csv
Last active January 10, 2019 05:00
Convert tsv to csv with optional unescaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.tsv\n";
exit main( @ARGV );
@acg
acg / csv2tsv
Created April 4, 2013 17:14
Convert csv to tsv with optional escaping.
#!/usr/bin/env perl
use Text::CSV;
use Getopt::Long qw/ GetOptionsFromArray :config pass_through /;
use warnings;
use strict;
my $usage = "usage: $0 [-e] < file.csv\n";
exit main( @ARGV );
anonymous
anonymous / attaching-closures-to-objects-in-php
Created January 3, 2013 15:57
Attaching PHP Closures/Anonymous Functions a Class/Object
<?php
/**
* references:
* http://www.murraypicton.com/2010/09/extending-objects-using-anonymous-functions-in-php/
* http://php.net/manual/en/functions.anonymous.php
* http://php.net/manual/en/function.is-callable.php
*/
class Foo {
public $bar;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 8, 2024 07:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a