snipt

Ctrl+h for KB shortcuts

Text only

Flash PROM on O2

/sbin/flashinst -T -y -q /usr/cpu/firmware/ip32prom.image
https://snipt.net/embed/a119f1f3efa6439b1d6a085fdead7a5d/
/raw/a119f1f3efa6439b1d6a085fdead7a5d/
a119f1f3efa6439b1d6a085fdead7a5d
text
Text only
1
2019-06-25T14:55:43
True
False
False
/api/public/snipt/54563/
flash-prom-on-o2
<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>/sbin/flashinst -T -y -q /usr/cpu/firmware/ip32prom.image </span></pre></div> </td></tr></table>
irix, sgi

Text only

Set sloppy focus and no autoraise on gnome3 and unity

1
2
3
4
5
6
# http://askubuntu.com/questions/64605/how-do-i-set-focus-follows-mouse
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy'
gsettings set org.gnome.desktop.wm.preferences auto-raise false

Optionally, turn off raise on clic:
gsettings set org.gnome.desktop.wm.preferences raise-on-click false
https://snipt.net/embed/923ece101dfffe2c76a85a65dcc0361b/
/raw/923ece101dfffe2c76a85a65dcc0361b/
923ece101dfffe2c76a85a65dcc0361b
text
Text only
6
2019-06-25T00:17:11
True
False
False
Dec 13, 2012 at 03:48 PM
/api/public/snipt/51787/
set-sloppy-focus-on-gnome3-and-unity
<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># http://askubuntu.com/questions/64605/how-do-i-set-focus-follows-mouse </span><span id="L-2"><a name="L-2"></a>gsettings set org.gnome.desktop.wm.preferences focus-mode &#39;sloppy&#39; </span><span id="L-3"><a name="L-3"></a>gsettings set org.gnome.desktop.wm.preferences auto-raise false </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Optionally, turn off raise on clic: </span><span id="L-6"><a name="L-6"></a>gsettings set org.gnome.desktop.wm.preferences raise-on-click false </span></pre></div> </td></tr></table>
gnome, ubuntu, unity

Bash

Delete control characters in a file.

tr -cd '[:print:]\n' < file > newfile
# Thanks to "command line magic" on twitter, follow 'im.
https://snipt.net/embed/8aae603002be1610ce62115e3fcf6c48/
/raw/8aae603002be1610ce62115e3fcf6c48/
8aae603002be1610ce62115e3fcf6c48
bash
Bash
2
2019-06-24T09:22:58
True
False
False
/api/public/snipt/51578/
delete-control-characters-in-a-file
<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>tr -cd <span class="s1">&#39;[:print:]\n&#39;</span> &lt; file &gt; newfile </span><span id="L-2"><a name="L-2"></a><span class="c1"># Thanks to &quot;command line magic&quot; on twitter, follow &#39;im.</span> </span></pre></div> </td></tr></table>
bash, linux, shell

Text only

Disable tab bar in gedit 3.x

gsettings set org.gnome.gedit.preferences.ui notebook-show-tabs-mode never
https://snipt.net/embed/47425c71be95a05e54baeed909257a63/
/raw/47425c71be95a05e54baeed909257a63/
47425c71be95a05e54baeed909257a63
text
Text only
1
2019-06-24T06:27:04
True
False
False
/api/public/snipt/46109/
disable-tab-bar-in-gedit-3x
<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>gsettings set org.gnome.gedit.preferences.ui notebook-show-tabs-mode never </span></pre></div> </td></tr></table>
gedit, gnome, gtk

Text only

Restart XFCE desktop without logging out

1
2
3
4
5
6
$ psg xfce4-settings-helper
neutvd   23850  0.0  0.0 238736  2936 pts/23   S    15:45   0:00 xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316
neutvd   23852  0.0  0.0 109252   952 pts/23   S+   15:45   0:00 grep --color=auto xfce4-settings-helper
[1]+  Done                    xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316
$ killall xfce4-settings-helper
$ xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316&
https://snipt.net/embed/e8bd0c7cf13b82ee078688aaf47bdb21/
/raw/e8bd0c7cf13b82ee078688aaf47bdb21/
e8bd0c7cf13b82ee078688aaf47bdb21
text
Text only
6
2019-06-24T06:16:00
True
False
False
/api/public/snipt/38598/
restart-xfce-desktop-without-logging-out
<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>$ psg xfce4-settings-helper </span><span id="L-2"><a name="L-2"></a>neutvd 23850 0.0 0.0 238736 2936 pts/23 S 15:45 0:00 xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316 </span><span id="L-3"><a name="L-3"></a>neutvd 23852 0.0 0.0 109252 952 pts/23 S+ 15:45 0:00 grep --color=auto xfce4-settings-helper </span><span id="L-4"><a name="L-4"></a>[1]+ Done xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316 </span><span id="L-5"><a name="L-5"></a>$ killall xfce4-settings-helper </span><span id="L-6"><a name="L-6"></a>$ xfce4-settings-helper --display :0.0 --sm-client-id 28a487073-8aa8-41cf-a61f-a662a2300316&amp; </span></pre></div> </td></tr></table>
XFCE

Bash

Compress PDF files on Linux

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
https://snipt.net/embed/adde0ea97d0e8ded963cbe955246e2b6/
/raw/adde0ea97d0e8ded963cbe955246e2b6/
adde0ea97d0e8ded963cbe955246e2b6
bash
Bash
2
2019-06-24T12:54:27
True
False
False
/api/public/snipt/37407/
compress-pdf-files-on-linux
<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>gs -sDEVICE<span class="o">=</span>pdfwrite -dCompatibilityLevel<span class="o">=</span>1.4 -dPDFSETTINGS<span class="o">=</span>/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile<span class="o">=</span>output.pdf input.pdf </span></pre></div> </td></tr></table>
compression, linux, pdf

Bash

URL handler for thunderbird

gconftool-2 --type string -s /desktop/gnome/url-handlers/http/command "google-chrome %s"
gconftool-2 --type string -s /desktop/gnome/url-handlers/https/command "google-chrome %s"
https://snipt.net/embed/bef4929c8dff1053e21fd76fadd45e08/
/raw/bef4929c8dff1053e21fd76fadd45e08/
bef4929c8dff1053e21fd76fadd45e08
bash
Bash
2
2019-06-21T22:10:28
True
False
False
/api/public/snipt/35602/
url-handler-for-thunderbird
<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>gconftool-2 --type string -s /desktop/gnome/url-handlers/http/command <span class="s2">&quot;google-chrome %s&quot;</span> </span><span id="L-2"><a name="L-2"></a>gconftool-2 --type string -s /desktop/gnome/url-handlers/https/command <span class="s2">&quot;google-chrome %s&quot;</span> </span></pre></div> </td></tr></table>
google-chrome, thunderbird