Skip to content

Instantly share code, notes, and snippets.

View sinewalker's full-sized avatar

Michael Lockhart sinewalker

View GitHub Profile
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
# Forked from the original to do the opposite: Switch ssh repo urls to https
# Original here: https://gist.github.com/m14t/3056747
# Thanks to @m14t
#origin or upstream
REMOTE=${1-origin}
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'`
@orta
orta / notes.md
Last active November 7, 2016 02:54
Notes on Spacemacs

Start out

install via

  brew tap railwaycat/homebrew-emacsmacport
  brew install emacs-mac --with-spacemacs-icon  # OR, brew cask install emacs-mac
  brew linkapps

Terminology

@owainlewis
owainlewis / hipchat.el
Created May 8, 2013 10:58
HipChat Jabber Emacs
;; HipChat
(setq ssl-program-name "gnutls-cli"
ssl-program-arguments '("--insecure" "-p" service host)
ssl-certificate-verification-policy 1)
;; Connect using jabber.el
;; M-x jabber-connect <RET>
;; Config
@jiffyclub
jiffyclub / pygments_magic.py
Created April 15, 2013 03:27
Ipython magics for displaying source code files with syntax highlighting.
"""
IPython magics for displaying source code files with syntax highlighting.
This uses the Pygments library: http://pygments.org.
Two magics are available:
%highlight: This uses a terminal formatter and will work in any of IPython's
front ends.
%highlight_html: This uses an HTML formatter and is best used in the
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }

Adrian -

I appreciate that you spent time in writing this post. I know I've been up until 2am writing similarly long ones as well. I will take responsibility for having what is likely an irrational response (I blame Twitter for that) to the term "NoOps", but I invite you to investigate why that might be. I'm certainly not the only one who feels this way, apparently, and thus far have decided this issue is easily the largest distraction in my field I've encountered in recent years. I have had the option to simply ignore my opposition to the term, and just let the chips fall where they may with how popular the term "NoOps" may or may not get. I have obviously not taken that option in the past, but I plan to in the future.

You're not an analyst saying "NoOps". Analysts are easy (for me) to ignore, because they're not practitioners. We have expectations of engineering maturity from practitioners in this field of web engineering, especially those we consider leaders. I don't have any expectations from analysts,

@karlingen
karlingen / switch_user.php
Last active April 23, 2021 15:17
SugarCRM user switching / login as another user
<?php
/**
* Login as another user in SugarCRM and switch back to admin user
*
* Simply put this file into a custom entry point file and
* browse to it with the parameters 'user_name' or 'back_to_sudo'
*
* Usage:
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&user_name=mylittlepony
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&back_to_sudo=1
@Wilfred
Wilfred / init.lua
Created June 8, 2021 18:46
switch to firefox with hammerspoon
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "F", function()
local app = hs.application'firefox'
if app ~= nil then
app:activate()
end
end)
@even4void
even4void / .emacs
Last active August 21, 2021 08:47
Basic setup to use Gmail from Emacs using a combination of mu, mu4e and offlineimap
(require 'offlineimap)
(add-to-list 'load-path "~/.emacs.d/lib/mu4e")
(require 'mu4e)
(require 'mu4e-maildirs-extension)
(mu4e-maildirs-extension)
(setq mu4e-drafts-folder "/drafts"
mu4e-sent-folder "/sent"
mu4e-trash-folder "/trash")
(setq mu4e-maildir-shortcuts
@cpq
cpq / restore_mac_trash.pl
Created January 22, 2015 10:41
MacOS: restore all files from Trash folder to their original location
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }