mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
tabs to spaces
This commit is contained in:
parent
f18778774c
commit
fd785fcf2f
7 changed files with 33 additions and 33 deletions
|
|
@ -64,9 +64,9 @@ Tags: rails, coding, hacking, migration, rails, testing
|
|||
|
||||
<ol>
|
||||
<li>Separating data, function, and design</li>
|
||||
<li>Readability (which is underrated) </li>
|
||||
<li>Database migrations</li>
|
||||
<li>Testing is so easy it hurts</li>
|
||||
<li>Readability (which is underrated) </li>
|
||||
<li>Database migrations</li>
|
||||
<li>Testing is so easy it hurts</li>
|
||||
</ol>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ Tags: textmate, rails, hacking, commands, macro, rails, snippets, textmate
|
|||
|
||||
<ul>
|
||||
<li><strong>Save:</strong> Nothing</li>
|
||||
<li><strong>Input:</strong> Selected Text or Nothing</li>
|
||||
<li><strong>Output:</strong> Insert as Snippet</li>
|
||||
<li><strong>Activation:</strong> Whatever you want, I'm going to use a macro described below and leave this empty</li>
|
||||
<li><strong>Scope Selector:</strong> source.ruby.rails</li>
|
||||
<li><strong>Input:</strong> Selected Text or Nothing</li>
|
||||
<li><strong>Output:</strong> Insert as Snippet</li>
|
||||
<li><strong>Activation:</strong> Whatever you want, I'm going to use a macro described below and leave this empty</li>
|
||||
<li><strong>Scope Selector:</strong> source.ruby.rails</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -55,9 +55,9 @@ Tags: textmate, rails, hacking, commands, macro, rails, snippets, textmate
|
|||
The macro I'm thinking of to invoke this is tab-triggered and will simply:
|
||||
<ul>
|
||||
<li>Select word (<code><strong>⌃W</strong></code>)</li>
|
||||
<li>Delete (<code><strong>⌫</strong></code>)</li>
|
||||
<li>Select to end of file (<code><strong>⇧⌘↓</strong></code>)</li>
|
||||
<li>Run command "Put in self.down"</li>
|
||||
<li>Delete (<code><strong>⌫</strong></code>)</li>
|
||||
<li>Select to end of file (<code><strong>⇧⌘↓</strong></code>)</li>
|
||||
<li>Run command "Put in self.down"</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Now that you have your activations backed up you need to have the correct ones c
|
|||
|
||||
If you have XP Pro then you can get it to run using the Group Policy editor. Save the activate.bat script provided here anywhere and then have it run as a system service. Go Start -> Run... -> gpedit.msc [enter] Computer Configuration -> Windows Settings -> Scripts (Startup/Shutdown) -> Startup -> Add.
|
||||
|
||||
<p>If you have XP Home then the best you can do is run this script from your Startup folder (Start -> All Programs -> Startup), but that is not really going to work because eventually Windows will not even let you log in until you activate it. What a P.O.S.</p>
|
||||
<p>If you have XP Home then the best you can do is run this script from your Startup folder (Start -> All Programs -> Startup), but that is not really going to work because eventually Windows will not even let you log in until you activate it. What a P.O.S.</p>
|
||||
|
||||
@echo off
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Tags: coding, haskell
|
|||
From <a href="http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/firststeps.html">Write Yourself a Scheme in 48 hours</a>:
|
||||
|
||||
<blockquote>
|
||||
<p>Basically, a monad is a way of saying "there's some extra information attached to this value, which most functions don't need to worry about". In this example, the "extra information" is the fact that this action performs IO, and the basic value is nothing, represented as "()". Monadic values are often called "actions", because the easiest way to think about the IO monad is a sequencing of actions that each might affect the outside world.</p>
|
||||
<p>Basically, a monad is a way of saying "there's some extra information attached to this value, which most functions don't need to worry about". In this example, the "extra information" is the fact that this action performs IO, and the basic value is nothing, represented as "()". Monadic values are often called "actions", because the easiest way to think about the IO monad is a sequencing of actions that each might affect the outside world.</p>
|
||||
</blockquote>
|
||||
|
||||
I really like this tutorial. I'm only on part 3.3 of 12, <a href="http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/parser.html">parsing</a>, but I'm new to Haskell so I'm learning left, right & centre. The exercises are taking me hours of reading and experimenting, and it's lots of fun! ghc's errors are usually quite helpful and of course ghci is a big help as well.
|
||||
|
|
@ -28,7 +28,7 @@ Okay that's pretty simple right? Let's break it down, first looking at the right
|
|||
* <code>liftM</code> is concisely and effectively defined <a href="http://members.chello.nl/hjgtuyl/tourdemonad.html#liftM">elsewhere</a>, and I'll borrow their description:
|
||||
|
||||
<blockquote>
|
||||
<p><code>liftM f m</code> lets a non-monadic function <code>f</code> operate on the contents of monad <code>m</code></p>
|
||||
<p><code>liftM f m</code> lets a non-monadic function <code>f</code> operate on the contents of monad <code>m</code></p>
|
||||
</blockquote>
|
||||
|
||||
<code>liftM</code>'s type is also quite telling: <code>liftM :: (Monad m) => (a -> b) -> (m a -> m b)</code>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<p align=center id=out></p>
|
||||
<script>
|
||||
var x = Number(localStorage['test'] || 0)
|
||||
var x = Number(localStorage['test'] || 0)
|
||||
document.getElementById('out').innerHTML = x
|
||||
x += 1
|
||||
localStorage['test'] = x
|
||||
x += 1
|
||||
localStorage['test'] = x
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
if (timeout) clearTimeout(timeout);
|
||||
timeout = setTimeout(saveNote, 100);
|
||||
});
|
||||
restoreNote();
|
||||
note.focus();
|
||||
restoreNote();
|
||||
note.focus();
|
||||
});
|
||||
function saveNote() {
|
||||
localStorage.note = note.innerText;
|
||||
timeout = null;
|
||||
timeout = null;
|
||||
}
|
||||
function restoreNote() {
|
||||
note.innerText = localStorage.note || '';
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/images\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image\/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff"
|
||||
"name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/images\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image\/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue