snipt

Ctrl+h for KB shortcuts

Text only

stop dock icons bouncing behavior

defaults write com.apple.dock no-bouncing -bool TRUE && killall Dock
https://snipt.net/embed/efc7b6a1df4064b633f62b633cd5dbb0/
/raw/efc7b6a1df4064b633f62b633cd5dbb0/
efc7b6a1df4064b633f62b633cd5dbb0
text
Text only
1
2016-12-13T11:04:30
True
False
True
Apr 15, 2014 at 09:40 AM
/api/public/snipt/130193/
stop-dock-icons-bouncing-behavior
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>defaults write com.apple.dock no-bouncing -bool TRUE &amp;&amp; killall Dock </span></pre></div> </td></tr></table>
dock, mac

Text only

Load jQuery from Google CDN , or load from your site if it's not available!

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script>window.jQuery || document.write('<script src="http://website.com/js/jquery-1.8.2.min.js"><\/script>')</script>
https://snipt.net/embed/877a66c9a0c13e0799d70ddb40d7474e/
/raw/877a66c9a0c13e0799d70ddb40d7474e/
877a66c9a0c13e0799d70ddb40d7474e
text
Text only
1
2019-02-13T20:13:47
True
False
True
Feb 12, 2014 at 12:21 PM
/api/public/snipt/113085/
load-jquery-from-google-cdn-or-load-from-your-site-if-its-not-available
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script&gt;window.jQuery || document.write(&#39;&lt;script src=&quot;http://website.com/js/jquery-1.8.2.min.js&quot;&gt;&lt;\/script&gt;&#39;)&lt;/script&gt; </span></pre></div> </td></tr></table>
cdn, jquery

Text only

Increment php upload file size (add in htaccess)

php_value post_max_size 30M
php_value upload_max_filesize 30M
https://snipt.net/embed/23b1348ea164525fe04eb511ff37121d/
/raw/23b1348ea164525fe04eb511ff37121d/
23b1348ea164525fe04eb511ff37121d
text
Text only
2
2016-12-24T10:14:27
True
False
True
Jan 11, 2014 at 01:42 PM
/api/public/snipt/105048/
increment-php-upload-file-size-add-in-htaccess
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>php_value post_max_size 30M </span><span id="L-2"><a name="L-2"></a>php_value upload_max_filesize 30M </span></pre></div> </td></tr></table>
htaccess, php, wordpress

PHP

Wordpress - get the theme URL

<?php echo get_template_directory_uri(); ?>
https://snipt.net/embed/ba0d1bb6e4d14bcf9c8c94a71693a2e8/
/raw/ba0d1bb6e4d14bcf9c8c94a71693a2e8/
ba0d1bb6e4d14bcf9c8c94a71693a2e8
php
PHP
1
2016-12-27T22:37:50
True
False
True
Jun 14, 2013 at 10:00 AM
/api/public/snipt/64220/
wordpress-get-the-theme-url
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">get_template_directory_uri</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
wordpress

Text only

Show hidden files in mac os

1
2
3
4
5
in the terminal write
defaults write com.apple.Finder AppleShowAllFiles YES
relaunch finder with ctrl+alt+click on icon
defaults write com.apple.Finder AppleShowAllFiles NO
to keep back
https://snipt.net/embed/d71acc16695737340aeed36e5a22f9e3/
/raw/d71acc16695737340aeed36e5a22f9e3/
d71acc16695737340aeed36e5a22f9e3
text
Text only
5
2016-12-25T20:12:09
True
False
True
Dec 10, 2012 at 04:33 AM
/api/public/snipt/51517/
show-hidden-files-in-mac-os
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>in the terminal write </span><span id="L-2"><a name="L-2"></a>defaults write com.apple.Finder AppleShowAllFiles YES </span><span id="L-3"><a name="L-3"></a>relaunch finder with ctrl+alt+click on icon </span><span id="L-4"><a name="L-4"></a>defaults write com.apple.Finder AppleShowAllFiles NO </span><span id="L-5"><a name="L-5"></a>to keep back </span></pre></div> </td></tr></table>
mac

JavaScript

javascript redirect with timeout

1
2
3
4
5
6
<script>
	function Redirect(){
		location.href = 'http://www.anothersite.com';
	}
	setTimeout('Redirect()',2000);
</script>
https://snipt.net/embed/c7712b90ab216c7fb3021def94be87fe/
/raw/c7712b90ab216c7fb3021def94be87fe/
c7712b90ab216c7fb3021def94be87fe
js
JavaScript
6
2019-07-28T19:00:12
True
False
True
Jun 13, 2013 at 03:21 AM
/api/public/snipt/46100/
javascript-redirect-with-timeout
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="o">&lt;</span><span class="nx">script</span><span class="o">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="kd">function</span> <span class="nx">Redirect</span><span class="p">(){</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">location</span><span class="p">.</span><span class="nx">href</span> <span class="o">=</span> <span class="s1">&#39;http://www.anothersite.com&#39;</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">}</span> </span><span id="L-5"><a name="L-5"></a> <span class="nx">setTimeout</span><span class="p">(</span><span class="s1">&#39;Redirect()&#39;</span><span class="p">,</span><span class="mi">2000</span><span class="p">);</span> </span><span id="L-6"><a name="L-6"></a><span class="o">&lt;</span><span class="err">/script&gt;</span> </span></pre></div> </td></tr></table>
javascript, redirect

PHP

remove "edit this entry" in wordpress frontend (when you're logged)

//add it in your functions.php (on the actual theme)
add_filter( 'edit_post_link', '__return_false' );
https://snipt.net/embed/791331d65f6c0f1a69edebf37474777c/
/raw/791331d65f6c0f1a69edebf37474777c/
791331d65f6c0f1a69edebf37474777c
php
PHP
2
2019-06-21T13:55:53
True
False
True
Nov 16, 2012 at 06:33 AM
/api/public/snipt/43754/
remove-edit-this-entry-in-wordpress-frontend-when-youre-loggen
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">//add it in your functions.php (on the actual theme)</span> </span><span id="L-2"><a name="L-2"></a><span class="x">add_filter( &#39;edit_post_link&#39;, &#39;__return_false&#39; );</span> </span></pre></div> </td></tr></table>
wordpress

Text only

Always show library folder on Mountain Lion

1
2
3
chflags nohidden ~/Library

Otherwise you just can hold ALT in the "Go" Finder menu
https://snipt.net/embed/8b2e4058c1c41bda20ae4a4fcd52ce41/
/raw/8b2e4058c1c41bda20ae4a4fcd52ce41/
8b2e4058c1c41bda20ae4a4fcd52ce41
text
Text only
3
2016-12-17T18:13:44
True
False
True
Nov 16, 2012 at 06:33 AM
/api/public/snipt/43607/
mostrare-la-cartella-libreria-su-mac-osx-lion
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>chflags nohidden ~/Library </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Otherwise you just can hold ALT in the &quot;Go&quot; Finder menu </span></pre></div> </td></tr></table>
mac