Skip to content

Instantly share code, notes, and snippets.

Avatar

Han apricot13

View GitHub Profile
@apricot13
apricot13 / popup.html
Created May 9, 2015
Google Maps: popup map Uses fancybox http://fancybox.net/ (not fancybox 2)
View popup.html
<a id="popupmap" href="popuplocationmap.html"><img src="map.png" width="31" height="33" class="contactMap"/></a>
@apricot13
apricot13 / folderwatch.md
Last active Aug 29, 2015
Applescript: Watch folder and update labels
View folderwatch.md
-- I want edited folders to be red.
	property red : 2
    on adding folder items to this_folder after receiving added_items
         try
              tell application "Finder"
          -- set label of the 'watched' folder to red
                   set label index of this_folder to red

-- for the items added

@apricot13
apricot13 / folderHasNewContent.scpt
Created Mar 28, 2013
An applescript to monitor a folder and add a red label to any new files/folders added.
View folderHasNewContent.scpt
-- I want edited folders to be red.
property red : 2
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
@apricot13
apricot13 / UserScript: Quick link to Flickr Url and HTML code for images.js
Last active Dec 21, 2015
I've always preferred sourcing my (as in my own) blog post images from the flickr website rather than use a plugin. This is a very basic user script that puts the url of the image you want in the image thumbnail as your browsing the site, it makes it much quicker to open them all in new tabs then copy them over to your blog post.
View UserScript: Quick link to Flickr Url and HTML code for images.js
View workflowy.css
#documentView {
font-family: Open Sans
}
.page {
width: 90% !important;
margin: 0px auto;
transform: none !important;
}
.name {
padding-bottom: 5px !important;
@apricot13
apricot13 / Nicely-formatted-git.md
Last active Jul 13, 2016
Nicely formatted git
View Nicely-formatted-git.md

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

alias

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

And every time you need to see your log, just type in git lg

View typeformbug.html
<!doctype html>
<html class="no-js" lang="en-gb">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</script>
View gist:26d7142333c78cc4bdbe2e2da00c59cd
http://www.secretgeek.net/trello_ws
```js
var s = [];
s.push("# " + jQuery(".board-header").children()[0].innerText);
jQuery(".list:has(.list-header-name)").each(function() {
s.push("\n## " + jQuery(this).find(".list-header-name-assist")[0].innerText + "\n");
jQuery(this).find(".list-card").each(function() {
var lne = "* " + jQuery(this).find(".list-card-title")[0].innerText
View 01 - choose-image.html
<!-- Step 1 - we need people to be able to choose their image -->
<div class="test-image">
<input type="file" id="testImage" onchange="onFileSelected(event)" />
</div>
@apricot13
apricot13 / git_feature_branch
Created Jan 8, 2015
Git: Feature branch workflow
View git_feature_branch
git checkout -b feature-branch master
git status
git add <some-file>
git commit
git push -u origin feature-branch
git push
git checkout master