Skip to content

Instantly share code, notes, and snippets.

@nellynette
nellynette / Modify PATH
Last active October 21, 2017 09:35
nothing new. just to remember some commands on OS X
#to set the variable PATH to the value /bin:/sbin:/user/bin:/user/sbin:/system/Library/, you would enter the following command in a Terminal window:
$ PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH
#This modifies the environment variable PATH with the value assigned.
#To view all environment variables, enter:
$ env
@nellynette
nellynette / social_sharing
Created July 27, 2013 05:11
Social Media Sharing Codes
<!-- Facebook--> <br><a href="http://www.facebook.com/share.php?u=<?php echo $current_url; ?>" target="_blank"><img src="/images/icons/share/32/facebook.png" alt="Share on Facebook" title="Share on facebook"/></a>
<!--Twitter share-->
<a href="http://twitter.com/home?status=<?php echo urlencode($title).' '.$current_url; ?>" title="Click to share this post on Twitter" target="_blank"><img src="/images/icons/share/32/twitter.png" alt="Share on Twitter" title="Share on twitter"></a>
<!--Google +1 Button -->
<a href="https://plus.google.com/share?url=<?php echo urldecode($current_url); ?>" onclick="javascript:window.open(this.href, '_blank','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img src="/images/icons/share/32/google_plus.png" title="Share on Google+" alt="Share on Google+"/></a>
<!-- Reddit -->
<a href="http://reddit.com/submit?url=<?php echo $current_url; ?>&title=<?php echo urlencode($article_title); ?>" title="Share on Reddit" target="_blank"><img src
.threedigit { color: #09C; }
.sixdigit { color: #0099CC; } /*same color as above*/
/* RGB model */
p { color: #F00 } /* #rgb */
p { color: #FF0000 } /* #rrggbb */
p { color: rgb(255, 0, 0) } /* integer range 0 - 255 */
p { color: rgb(100%, 0%, 0%) } /* float range 0.0% - 100.0% */
/* RGB with alpha channel, added to CSS3 */
p { color: rgba(255, 0, 0, 0.5) } /* 0.5 opacity, semi-transparent */
/* HSL model, added to CSS3 */
New Script Group.dtTemplate
English.lproj
Script Name (I would change this in DEVONthink after creation)
Scriptgrounds
Old Versions
SystemStarter - Start, stop, and restart system services
Xmark - summarize x11perf results
Xnest - a nested X server
Xquartz - X window system server for Quartz operating system
Xvfb - virtual framebuffer X server for X Version 11
a2p - Awk to Perl translator
...
#!/usr/local/bin/python
import requests
import re
import keychain
########
# Configure these settings
username = &#39;you@email.com&#39;
mypass = keychain.get_password(&#39;instapaper&#39;, username)
#!/bin/bash
curl -O http://cloud.github.com/downloads/whomwah/qlstephen/QLStephen.qlgenerator.zip
unzip QLStephen.qlgenerator.zip
echo "Please enter your password when asked (the one sudo asks you for usuqlly). It's needed to copy some files to /Library/QuickLook"
sudo mv -f QLStephen.qlgenerator /Library/QuickLook
rm QLStephen.qlgenerator.zip
qlmanage -r
echo "We're done. Have fun and do not forget to give a credit to QLStephen's author Duncan@https://github.com/whomwah"