This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; A macro that replaces reg-sub, it inserts debug print statements into reg-sub if a flag of choice is set | |
;; Developed since 0.8.0 does not work with re-frame-tracer | |
;; Use it by replacing re-frame.core/reg-sub with this macro | |
(defmacro reg-sub [label & sub] | |
(let [fun (last sub) | |
arg (get-in (vec fun) [1 1 1]) | |
[before after] (split-at 2 fun) | |
new-fun (concat before [`(js/console.log "Sub: " [~label ~arg])] after)] | |
(if (= "true" env/PRODUCTION) ;; Or whatever way you want to disable this, may also be done by replacing js/console.log above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# %%% Requires: ios-deploy (to install built app on device), terminal-notification (optional, to get a notification when build is done) | |
# %%% Put this file in <APPDIR>/script/ | |
# %%% SPECIFY THE NAME OF YOUR APP %%% | |
APPNAME="Pilloxa" | |
cd "$(dirname "$0")" | |
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
brew install highlight | |
sed -i '' 's/{ Lang="charmm"/{ Lang="clojure", Extensions={"clj", "cljs", "cljc"} },\ | |
{ Lang="charmm"/g' /usr/local/etc/highlight/filetypes.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if git diff --cached | grep 'println'; | |
then | |
tput setaf 1; echo "ERROR: You tried to commit a println statement" | |
tput bel | |
exit 1; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean .orig files with prompt | |
git clean -i | |
# Delete file from repo after it has been added to .gitignore | |
git rm --cached filename | |
# Search in commit messages for specific text | |
git log grep="Text to search for" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textarea | |
box-sizing border-box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo /etc/init.d/apache2 $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful way to manage urls in Apache, this creates a symbolic link in the /var/www folder | |
sudo ln -s /dir/with/files /var/www/yoururl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-YOURIDHERE', 'auto'); | |
ga('send', 'pageview'); | |
var w = window, | |
d = document, |
NewerOlder