snipt

Ctrl+h for KB shortcuts

PHP

creating a bundle

1
2
3
4
5
6
7
8
<?php
namespace Bundles\\MyBundle;
use Exception;
use e;

class Bundle {

}
https://snippets.siftie.com/embed/08dc76b357726d5d72eacad88a34edf9/
/raw/08dc76b357726d5d72eacad88a34edf9/
08dc76b357726d5d72eacad88a34edf9
php
PHP
8
2019-03-19T20:31:19
True
False
False
/api/public/snipt/32230/
creating-a-bundle
<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> <a href="#L-7">7</a> <a href="#L-8">8</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><span id="L-2"><a name="L-2"></a><span class="k">namespace</span> <span class="nx">Bundles\\MyBundle</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="k">use</span> <span class="nx">Exception</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="k">use</span> <span class="nx">e</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a><span class="k">class</span> <span class="nc">Bundle</span> <span class="p">{</span> </span><span id="L-7"><a name="L-7"></a> </span><span id="L-8"><a name="L-8"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
bundle, e3

Bash

update foundation

bundle update zurb-foundation
https://snippets.siftie.com/embed/5ff96e0f3333541594bbe94e188dea41/
/raw/5ff96e0f3333541594bbe94e188dea41/
5ff96e0f3333541594bbe94e188dea41
bash
Bash
1
2019-03-04T16:26:45
True
False
False
/api/public/snipt/31157/
update-foundation
<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>bundle update zurb-foundation </span></pre></div> </td></tr></table>
bundle, ruby, zurb-foundation

Objective-C

Get app version as NSString

NSString *version = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL,(CFStringRef)[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"], NULL, (CFStringRef)@" !*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8);
https://snippets.siftie.com/embed/249f4913bd7d6e5040158ee0a29f9394/
/raw/249f4913bd7d6e5040158ee0a29f9394/
249f4913bd7d6e5040158ee0a29f9394
objective-c
Objective-C
1
2019-03-22T09:37:13
True
False
False
/api/public/snipt/25858/
get-app-version-as-nsstring
<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="bp">NSString</span> <span class="o">*</span><span class="n">version</span> <span class="o">=</span> <span class="p">(</span><span class="bp">NSString</span> <span class="o">*</span><span class="p">)</span><span class="n">CFURLCreateStringByAddingPercentEscapes</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,(</span><span class="n">CFStringRef</span><span class="p">)[[</span><span class="bp">NSBundle</span> <span class="n">mainBundle</span><span class="p">]</span> <span class="nl">objectForInfoDictionaryKey</span><span class="p">:</span><span class="s">@&quot;CFBundleVersion&quot;</span><span class="p">],</span> <span class="nb">NULL</span><span class="p">,</span> <span class="p">(</span><span class="n">CFStringRef</span><span class="p">)</span><span class="s">@&quot; !*&#39;();:@&amp;=+$,/?%#[]&quot;</span><span class="p">,</span> <span class="n">kCFStringEncodingUTF8</span><span class="p">);</span> </span></pre></div> </td></tr></table>
bundle, ios, nsstring, version

Text only

TextMate Bundle for PHP that I call Suitcase activated with 'sc'+tab for easily echoing array type variables in a browser readable output.

1
2
3
${1:echo} "${2:name_of_array} = <br /><pre>";
${1:echo} print_r(\$${2});
${1:echo} "</pre>";$0
https://snippets.siftie.com/embed/b87be31afd84d7555301d166de362aaa/
/raw/b87be31afd84d7555301d166de362aaa/
b87be31afd84d7555301d166de362aaa
text
Text only
3
2019-03-11T04:20:20
True
False
False
/api/public/snipt/2005/
textmate-bundle-for-php-that-i-call-suitcase-activated-with-sctab-for-easily-echoing-array-type-variables-in-a-browser-readable-output
<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>${1:echo} &quot;${2:name_of_array} = &lt;br /&gt;&lt;pre&gt;&quot;; </span><span id="L-2"><a name="L-2"></a>${1:echo} print_r(\$${2}); </span><span id="L-3"><a name="L-3"></a>${1:echo} &quot;&lt;/pre&gt;&quot;;$0 </span></pre></div> </td></tr></table>
array, bundle, debugging, echo, output, php, print, print_r, textmate