Skip to content

Instantly share code, notes, and snippets.

View taylor's full-sized avatar
🐢
🌊

Taylor Carpenter taylor

🐢
🌊
View GitHub Profile
#!/usr/bin/env bash
echo $0
echo $SHELL
echo $*
# Nexus_5 - MTP mount & unmount rules
#SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee1", MODE="0666", OWNER="taylor", ENV{ID_MODEL}="Nexus_5"
#ENV{ID_MODEL}=="Nexus_5", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", RUN+="/usr/bin/sudo -b -u taylor /usr/bin/go-mtpfs -dev=18d1:4ee1 -allow-other=true /media/Nexus_5"
#ENV{ID_MODEL}=="Nexus_5", ENV{ID_MODEL_ID}=="4ee1", ACTION=="remove", RUN+="/bin/umount /media/Nexus_5"
#ENV{PRODUCT}=="18d1/4ee1/232", ACTION=="add", RUN+="/sbin/sudo go-mtpfs -allow-other=true /media/Nexus_5"
#ENV{ID_MODEL}=="Nexus_5", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", SUBSYSTEM=="usb", RUN+="/sbin/sudo -b -u taylor /sbin/go-mtpfs -allow-other=true /media/Nexus_5"
#ENV{ID_MODEL}=="Nexus_5", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", SUBSYSTEM=="usb", RUN+="/usr/local/bin/androidmount"
#ENV{ID_MODEL}=="Nexus_5", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", SUBSYSTEM=="usb", RUN+="/sbin/sudo -b /sbin/go-mtpfs /media/Nexus_5"
@taylor
taylor / gist:8701482603d44a7c0057
Created September 19, 2014 18:39
my laptop-mode config differences from working x230 to new x230
ac97-powersave.conf
auto-hibernate.conf
--- /etc/laptop-mode/conf.d/auto-hibernate.conf 2014-09-07 13:38:23.000000000 -0500
+++ auto-hibernate.conf 2013-09-25 21:09:36.603610468 -0500
@@ -8,21 +8,21 @@
# Auto-hibernation settings
# -------------------------
#
-#__COMMENT Using these settings, you can make laptop mode tools automatically put your
-#__COMMENT computer into hibernation when the battery level goes critically low.
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
#!/bin/bash
cmd="transset-df"
cmdopts="-a"
if [ ! -x "/usr/bin/$cmd" ] ; then
echo "install transset"
exit
fi
#!/bin/bash -x
# vim: ft=sh
RUBY=no
POSTGRES=no
REDIS=no
MEMCACHED=no
TAYLOR_VIM=yes
TAYLOR_TMUX=yes
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
#root /usr/share/nginx/html;
#index index.html index.htm;
#server_name www.example.com;
access_log /var/log/nginx/http_redirect.log combined;
return 301 https://$server_name$request_uri;
}
public Gist test with out -p (lowercase) or with -P (capital)

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
#!/bin/sh
function usage() {
echo "usage: $0 <line number|IP>"
}
if [ -z "$1" ] ; then
usage
exit
elif [ "$1" = "-y" ] ; then