Skip to content

Instantly share code, notes, and snippets.

View iCross's full-sized avatar
🚀
Solving problems with efficiency.

Lukas iCross

🚀
Solving problems with efficiency.
  • autonomad
  • Taiwan
  • 17:56 (UTC +08:00)
View GitHub Profile
<div id="target" ></div>
<script>
var google_ad_client = 'ca-pub-1821434700708607',
google_ad_slot = '2826960791',
google_ad_width = 728,
google_ad_height = 90;
(function() {
var w = document.write;
@iCross
iCross / unicorn
Last active August 29, 2015 14:11
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
--- This will take a url on your clipboard, and use google to shorten it
--- create a new text expander item, set to applescript and paste this in.
--- set your google developer api key :
set myKey to "XXXXXXXXXXXXXXXXXXXXXXXXXX"
set the ClipURL to (the clipboard as string)
ignoring case
if ((characters 1 through 4 of ClipURL as string) is not "http") then
@iCross
iCross / gist:8bf0857125f4e8cfcacb
Created January 19, 2015 07:06
Bookmarklet: Copy url and title in markdown format
javascript:prompt("URL and title:", '['+document.title +']' +'('+document.location.href+')');void(0)
@iCross
iCross / gist:f1c2824d3861ee7d86ad
Created January 19, 2015 07:57
Bookmarklet: copy url and title
javascript:prompt("URL and title:", document.location.href +' ( '+ document.title+' )');void(0)
javascript:(function()%7Bfor%20(var%20i%20%3D%200%3B%20i%20%3C%20document.links.length%3B%20i%2B%2B)%20%7Bdocument.links%5Bi%5D.removeAttribute('onmousedown')%3B%7D%7D)()
@iCross
iCross / gist:962492d456afc0601b2f
Created February 4, 2015 15:48
google link cleaner
for (var i = 0; i < document.links.length; i++) {
document.links[i].removeAttribute('onmousedown');
}
// ==UserScript==
// @name Google Link Cleaner
// @description Prevents Google from being informed about each click on a result link.
// @include http://www.google.*/
// @include http://www.google.*/?*
// @include http://www.google.*/#*
// @include http://www.google.*/search*
// @include http://www.google.*/webhp*
// @include https://www.google.*/
// @include https://www.google.*/?*
ssh-keygen -R github.com
mv ~/.ssh/known_hosts.old /tmp/
http https://api.github.com/meta | jq -r '.ssh_keys[] | ("github.com " + .)' >> ~/.ssh/known_hosts
ssh -vT git@github.com
@iCross
iCross / brew_cleanup.sh
Last active March 26, 2023 01:11
brew upgrade and cleanup
alias brew_cleanup="brew update && brew outdated --verbose && brew upgrade && brew cleanup -s --prune=all && brew cleanup && brew autoremove --dry-run"
# brew autoremove