mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
update TypeKit code, add DNS prefetching, use https for gists
This commit is contained in:
parent
b465463454
commit
443765ffc7
3 changed files with 10 additions and 14 deletions
|
|
@ -44,15 +44,11 @@
|
||||||
<link rel="author" type="text/plain" href="/humans.txt">
|
<link rel="author" type="text/plain" href="/humans.txt">
|
||||||
<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="<%= site %>">
|
<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="<%= site %>">
|
||||||
|
|
||||||
<script type="text/javascript">
|
<link rel="dns-prefetch" href="https://gist.github.com">
|
||||||
(function(d) {
|
|
||||||
var config = {
|
<link rel="dns-prefetch" href="https://use.typekit.net">
|
||||||
kitId: 'tcm1whv',
|
<script src="https://use.typekit.net/tcm1whv.js"></script>
|
||||||
scriptTimeout: 3000
|
<script>try{Typekit.load({ async: true });}catch(e){}</script>
|
||||||
},
|
|
||||||
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
|
|
||||||
})(document);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
if (typeof console === 'undefined') {
|
if (typeof console === 'undefined') {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ Mac).</p>
|
||||||
<a href="/posts/2010/01/working-with-c-style-structs-in-ruby">
|
<a href="/posts/2010/01/working-with-c-style-structs-in-ruby">
|
||||||
CStruct</a> we define the Mach header like so:</p>
|
CStruct</a> we define the Mach header like so:</p>
|
||||||
|
|
||||||
<script src="http://gist.github.com/280635.js"></script>
|
<script src="https://gist.github.com/280635.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<h2>Segments</h2>
|
<h2>Segments</h2>
|
||||||
|
|
@ -82,7 +82,7 @@ e.g. \_\_DATA or \_\_TEXT </p>
|
||||||
<p>The code exposes some more details about segment commands, but should
|
<p>The code exposes some more details about segment commands, but should
|
||||||
be easy enough to follow.</p>
|
be easy enough to follow.</p>
|
||||||
|
|
||||||
<script src="http://gist.github.com/280642.js"></script>
|
<script src="https://gist.github.com/280642.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<h2>Sections</h2>
|
<h2>Sections</h2>
|
||||||
|
|
@ -105,7 +105,7 @@ two underscores, e.g. \_\_bss or \_\_text</p>
|
||||||
|
|
||||||
<p>Finally, the Ruby code describing section structs:</p>
|
<p>Finally, the Ruby code describing section structs:</p>
|
||||||
|
|
||||||
<script src="http://gist.github.com/280643.js"></script>
|
<script src="https://gist.github.com/280643.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<h2>macho.rb</h2>
|
<h2>macho.rb</h2>
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ supported by Array#pack is fairly easy to add though.
|
||||||
First a quick example and then we'll get into the CStruct class itself. In
|
First a quick example and then we'll get into the CStruct class itself. In
|
||||||
C you may write the following to have one struct "inherit" from another:
|
C you may write the following to have one struct "inherit" from another:
|
||||||
|
|
||||||
<script src="http://gist.github.com/279790.js"></script>
|
<script src="https://gist.github.com/279790.js"></script>
|
||||||
|
|
||||||
With CStruct in Ruby that translates to:
|
With CStruct in Ruby that translates to:
|
||||||
|
|
||||||
<script src="http://gist.github.com/279794.js"></script>
|
<script src="https://gist.github.com/279794.js"></script>
|
||||||
|
|
||||||
CStructs act like Ruby's built-in Struct to a certain extent. They are
|
CStructs act like Ruby's built-in Struct to a certain extent. They are
|
||||||
instantiated the same way, by passing values to #new in the same order they
|
instantiated the same way, by passing values to #new in the same order they
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue