Skip to content

Instantly share code, notes, and snippets.

View gradha's full-sized avatar

Grzegorz Adam Hankiewicz gradha

View GitHub Profile
@gradha
gradha / cycle_h.m
Created February 9, 2014 20:58
Generated code for nimrod objc hierarchy test. See https://github.com/Araq/Nimrod/issues/894 for context.
/* Generated by Nimrod Compiler v0.9.3 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -I/Users/gradha/project/nimrod/root/lib -o /private/tmp/cycle/nimcache/cycle_h.o /private/tmp/cycle/nimcache/cycle_h.m */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <stdio.h>
@gradha
gradha / parent.nim
Created February 14, 2014 16:03
Nimrod test for execShellCMD on macosx. Refers to https://github.com/Araq/Nimrod/pull/811.
import os
proc compile_child() =
let ret = execShellCMD("gcc -o sigsev.exe sigsev.c")
echo "Compilation returned ", ret
proc test() =
assert "sigsev.exe".existsFile, "Maybe compilation failed?"
echo "I'll run the child"
let ret = execShellCMD("./sigsev.exe")
@gradha
gradha / nimrod_completion.bash
Created April 26, 2014 17:04
Bash completion for Nimrod compiler http://nimrod-lang.org
#!/bin/bash
# Bash completion for the Nimrod programming language (http://nimrod-lang.org)
# based on the tutorial at
# http://www.debian-administration.org/article/317/An_introduction_to_bash_completion_part_2.
# Pass as first parameter the word to complete and replace nim|tmpl files.
_nimrod_complete_compilable_files()
{
local cur
# 1 "modified_headers/html_extra.h"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 169 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "modified_headers/html_extra.h" 2
<p>Problematic lines</p>
<table border='1' width='100%'><tr><td>
</td></tr></table>
## ``md_ext_fenced_code``
In markdown whenever you start a span or block with backticks, the text inside
will use `<code>` html blocks. When you enable this extension, code blocks
$ youtube-dl -U
youtube-dl is up-to-date (2014.07.10)
$ youtube-dl --verbose zTi9EfujYJM
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'zTi9EfujYJM']
[debug] Encodings: locale UTF-8, fs utf-8, out None, pref UTF-8
[debug] youtube-dl version 2014.07.10
[debug] Python version 2.7.5 - Darwin-13.3.0-x86_64-i386-64bit
[debug] Proxy map: {}
@gradha
gradha / Vagrantfile
Last active August 29, 2015 14:08
Vagrant ubuntu box to test nimrod, nimble and midnight_dynamite
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@gradha
gradha / stdlib_cpuinfo.c
Created December 3, 2014 17:16
cpuinfo as module compiled with patched 0.9.6 compiler in release mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -O3 -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>#include <sys/sysctl.h>
N_NOINLINE(void, stdlib_cpuinfoInit)(void) {
@gradha
gradha / stdlib_cpuinfo.c
Last active August 29, 2015 14:10
cpuinfo as module compiled with 0.9.6 compiler in release mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -O3 -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <sys/types.h>#include <sys/sysctl.h>N_NOINLINE(void, stdlib_cpuinfoInit)(void) {
}
@gradha
gradha / stdlib_cpuinfo.c
Created December 3, 2014 17:13
cpuinfo as module compiled with 0.9.6 compiler in debug mode
/* Generated by Nimrod Compiler v0.9.6 */
/* (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: MacOSX, amd64, clang */
/* Command for C compiler:
clang -c -w -I/private/tmp/back/Nimrod/lib -o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.o /private/tmp/back/Nimrod/nimcache/stdlib_cpuinfo.c */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>