Skip to content

Instantly share code, notes, and snippets.

View tuananh's full-sized avatar
☁️
Head of Tech Platform @ VPBank. AWS Community Builder

Tuan Anh Tran tuananh

☁️
Head of Tech Platform @ VPBank. AWS Community Builder
View GitHub Profile
@tuananh
tuananh / atom.xml
Created February 25, 2011 11:35
rss feed for jekyll
---
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 February 25, 2011 11:42
sitemap.html for jekyll
---
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 June 23, 2011 05:20
c++ memory management
int * foo()
{
int a = 5;
return &a;
}
using std::cout;
int main()
{
int* p = foo();
cout << *p;
System.CodeDom.Compiler.ICodeGenerator gen = new CSharpCodeProvider().CreateGenerator();
gen.GenerateCodeFromNamespace(ns, sw, new System.CodeDom.Compiler.CodeGeneratorOptions());
System.CodeDom.Compiler.CodeDomProvider provider = System.CodeDom.Compiler.CodeDomProvider.CreateProvider("CSharp");
provider.GenerateCodeFromNamespace(ns, sw, new System.CodeDom.Compiler.CodeGeneratorOptions());
msiexec /i vs_setup.msi vsextui=1 addlocal=all reboot=reallysuppress
{% if page.post-link %}
<h2><a href="{{ page.post-link }}">{{ page.title }}</a></h2>
{% else %}
<h2> {{ page.title }} </h2>
{% endif %}
---
layout: post
title: Posting link post in Jekyll
date: 2012-01-06 13:28
post-link: http://yourpostlink.com
---
defaults write com.panic.Transmit CopyURLWithoutLogin 0
{% if page.link %}
<h1><a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1><a href="{{ page.url }}">{{ page.title }}</a></h1>
{% endif %}