Skip to content

Instantly share code, notes, and snippets.

Avatar
✌️
Hi ;)

Tuan Anh Tran tuananh

✌️
Hi ;)
View GitHub Profile
@tuananh
tuananh / atom.xml
Created Feb 25, 2011
rss feed for jekyll
View atom.xml
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.sitename }} | {{ site.tagline }}</title>
<link href="{{ site.url }}atom.xml" rel="self"/>
<link href="{{ site.url }}"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
@tuananh
tuananh / sitemap.html
Created Feb 25, 2011
sitemap.html for jekyll
View sitemap.html
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{% for post in site.posts %}
@tuananh
tuananh / gist:1041948
Created Jun 23, 2011
c++ memory management
View gist:1041948
int * foo()
{
int a = 5;
return &a;
}
using std::cout;
int main()
{
int* p = foo();
cout << *p;
View gist:1138986
System.CodeDom.Compiler.ICodeGenerator gen = new CSharpCodeProvider().CreateGenerator();
gen.GenerateCodeFromNamespace(ns, sw, new System.CodeDom.Compiler.CodeGeneratorOptions());
View gist:1138990
System.CodeDom.Compiler.CodeDomProvider provider = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp");
provider.GenerateCodeFromNamespace(ns, sw, new System.CodeDom.Compiler.CodeGeneratorOptions());
View gist:1144586
msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress
View gist:1569797
{% if page.post-link %}
<h2><a href="{{ page.post-link }}">{{ page.title }}</a></h2>
{% else %}
<h2> {{ page.title }} </h2>
{% endif %}
View gist:1569806
---
layout: post
title: Posting link post in Jekyll
date: 2012-01-06 13:28
post-link: http://yourpostlink.com
---
View gist:1573444
defaults write com.panic.Transmit CopyURLWithoutLogin 0
View gist:6409249
{% if page.link %}
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
{% endif %}