Skip to content

Instantly share code, notes, and snippets.

View dserodio's full-sized avatar
🐕

Daniel Serodio dserodio

🐕
View GitHub Profile
@dserodio
dserodio / 0_Toggle Airport
Last active April 3, 2024 12:50 — forked from coltenkrauter/README.md
Toggle Airport: Disable Wi-Fi when connected to ethernet
Empty file to change the gist title
@dserodio
dserodio / dropdown.md
Created August 9, 2018 16:57 — forked from citrusui/dropdown.md
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@dserodio
dserodio / git-timestamp.sh
Created January 5, 2017 20:35 — forked from davidwindell/git-timestamp.sh
Set a files last modified time to match it's git commit timestamp
#!/bin/bash -e
####
# based on http://www.clock.co.uk/blog/a-guide-on-how-to-cache-npm-install-with-docker
#
# Set's the last modified timestamp of a file to it's repositories commit timestamp.
#
# Particularly useful with docker when building after a new git checkout has been made,
# can improve docker build times for composer, bower, npm, etc
#
# @see https://github.com/docker/docker/issues/3556
@dserodio
dserodio / gist:48635d457e01de3d4134f0dcabc9390b
Created January 5, 2017 20:20 — forked from jdoconnor/gist:32ef0314cecb80157c4e
Update mtimes based off commit time
#!/bin/bash -e
####
# based on https://gist.github.com/jeffery/1115504
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
@dserodio
dserodio / ruby22.spec
Created May 16, 2016 18:49 — forked from ik5/ruby22.spec
A ruby 2.2.x rpm spec file
%define rubyver 2.2.0
%define debug_package %{nil}
Name: ruby
Version: %{rubyver}
Release: 1%{?dist}
License: Ruby License/GPL - see COPYING
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel unzip openssl-devel db4-devel byacc make libyaml-devel valgrind-devel gmp-devel clang
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
## License: GNU General Public License v2, v3
#
# Lockable script boilerplate
### HEADER ###
LOCKFILE="/var/lock/`basename $0`"
@dserodio
dserodio / tunnel.sh
Last active August 31, 2018 20:43 — forked from anonymous/gist:223853355d67123fdda8
Shell script to start/stop an EC2 instance to use as a ssh tunnel
#!/bin/bash
# Start/stop an EC2 instance to use as a ssh tunnel
# requires the aws package locally -- sudo apt-get install awscli
#
# usage: ./tunnel.sh start (spin up EC2 and create the tunnel)
# ./tunnel.sh stop (terminate the EC2 instance to save money)
# ./tunnel.sh resume (in case your tunnel is interrupted but the EC2 instance is still running)
# CHANGE THE PARAMETERS BELOW
#!/bin/bash
#
# Copies certain kinds of known files and directories from a given Jenkins master directory
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em.
#
set -ex
if [ $# -ne 2 ]; then
echo usage: $0 root_dir jenkins_master
@dserodio
dserodio / 0_reuse_code.js
Created October 22, 2013 12:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dserodio
dserodio / Vagrantfile
Last active October 14, 2020 12:00 — forked from lorn/Vagrantfile
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.name = "ubuntu.local"
vb.customize [ 'modifyvm', :id, '--memory', '512' ]
vb.customize [ 'modifyvm', :id, '--cpus', '1' ]
end