Skip to content

Instantly share code, notes, and snippets.

View dustinsenos's full-sized avatar
🏠
Working from home

Dustin Senos dustinsenos

🏠
Working from home
View GitHub Profile
@dustinsenos
dustinsenos / gist:5294392
Created April 2, 2013 17:42
Retina Mouse Cursor Files. Below is the file location of the retina mouse cursors on OS X 10.8.3. All files are .pdfs (thanks Apple) so they should work perfectly in Photoshop, Illustrator etc.
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HiServices.framework/Versions/A/Resources/cursors
@dustinsenos
dustinsenos / zoombot.applescript
Last active June 25, 2020 09:26
Send a message in zoom every N seconds
-- this is working in Zoom v4.6.7
set appname to "zoom.us"
set botmessage to "[karaoke bot] ping! this message keeps the karaoke app running :)"
repeat while true
tell application appname
activate
end tell
tell application "System Events"
@dustinsenos
dustinsenos / rename-text-layers.js
Last active February 1, 2019 08:29
A simple sketch plugin to rename the selected layers to match the contents of their text.
var sketch = context.api()
var MAX_CHARS = 60
var document = sketch.selectedDocument
var selection = document.selectedLayers
var renamedTextLayers = false
selection.iterate(function(item) {
if (!item.isText) {
return
@dustinsenos
dustinsenos / Google Music Badge SVG.svg
Last active November 8, 2017 23:21
Cleaned up version of the google music badge. For some reason it had a ton of unneeded points…
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dustinsenos
dustinsenos / gist:3240838
Created August 2, 2012 21:31
LESS Mixin with String Interpolation, broken?
@cdn: "rons-house";
.add-bg(@url) {
background-image: @url;
}
.foo {
// works: background-image: url("@{cdn}/bar.png");
// works: .add-bg(@cdn);
.add-bg(url("@{cdn}/bar.png")); // doesn't work
@dustinsenos
dustinsenos / Force No Cache on all Files.conf
Created February 3, 2011 19:53
Adds headers in an attempt to stop all files from being cached
## No Cache
#
# Add this to your development .htaccess (or .conf) in an attempt to stop web browsers
# from caching files. Make sure to remove this from your site when launching live.
#
<FilesMatch "\.*">
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Thu, 01 Jan 1970 00:00:00 GMT"
</FilesMatch>
#
# Add the following line to ~/.profile to enable recursively adding all unversioned.
# You'll need to close and open terminal for this to take [e|a]ffect. Or run '. ~/.profile'
#
# Usage: Type 'svnaddall' (without quotes) from a directory containing unversioned files
#
alias svnaddall="svn st | grep '^\?' | tr '^\?' ' ' | xargs svn add"
@dustinsenos
dustinsenos / asshat.js
Created December 17, 2010 00:30
Add support for the <asshat> element in HTML
/*
After embedding the following JavaScript within your <head> element you can semantically
mark those who are asshats. The <asshat></asshat> tag is often used to replace <cite>
when quoting sources. The script will work in all flavours of IE and modern browsers.
Now where is my </sarcasm> tag?
This is free and unencumbered software released into the public domain.
/* Example 1 - Store as variable */
var leftImg = $(images[0]);
var centerImg = $(images[1]);
var rightImg = $(images[2]);
leftImg.css('left', -leftImg.width() + X_OFFSET);
centerImg.css('left', ((windowWidth / 2) - (centerImg.width() / 2)));
rightImg.css('left', windowWidth - X_OFFSET);
<script>
if ((document.all && !window.opera && window.XMLHttpRequest)) location.replace("http://www.youtube.com/watch?v=oHg5SJYRHA0");
</script>