Skip to content

Instantly share code, notes, and snippets.

Johan Andersson rejeep

Block or report user

Report or block rejeep

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rejeep
rejeep / robin.bash
Last active Jan 27, 2019
Robin check temperature script
View robin.bash
#!/bin/bash
# DEPENDENCIES: brew install jq curl
curl -X POST "https://mypages.verisure.com/j_spring_security_check?locale=sv_SE" \
--data 'j_username=robin@liljeros.nu&j_password=...' \
--cookie cookie.txt \
--cookie-jar cookie.txt
curl -X GET "https://mypages.verisure.com/overview/climatedevice?_=1548613153475" \
View travis-evm-cask.sh
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@rejeep
rejeep / travis.sh
Last active Dec 29, 2015
Setup Evm and Cask on Travis.
View travis.sh
#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/7736123/raw > travis.sh && source ./travis.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
View rejeep-projectile-completion-fn.el
(defun rejeep-projectile-completion-fn (prompt choises)
"Projectile completion function that only shows file name.
If two files have same name, new completion appears to select between
them. These include the path relative to the project root."
(interactive)
(let* ((stripped-choises
(-uniq (--map (file-name-nondirectory it) choises)))
(choise
(ido-completing-read prompt stripped-choises))
@rejeep
rejeep / gist:2922929
Created Jun 13, 2012
Comment and duplicate line
View gist:2922929
(defun comment-and-duplicate-line ()
"Copy current line to line below and comment current line."
(interactive)
(let* ((beg (line-beginning-position))
(end (line-end-position))
(line (buffer-substring-no-properties beg end))
(column (current-column)))
(comment-region beg end)
(goto-char (line-end-position))
(newline)
You can’t perform that action at this time.