Skip to content

Instantly share code, notes, and snippets.

Avatar

Dexter M Haslem DexterHaslem

View GitHub Profile
View .emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (wombat)))
'(tool-bar-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
View runtimeLoad_LINQPAD.cs
/* paste these in top so LINQPad eats and adds to usings
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
*/
public class Program
{
private static string src =
View barf.cs
Func<int, int, int> f = null;
f = new Func<int, int, int>( (x,y) =>
{
Console.WriteLine(x);
if (f != null && y < 5)
return x + f(x, y + 1);
return x + x;
});
f(1, 0);
View gist:d84b00c0bde9dc014d9f
as it loads:
warning: .dynamic section for "/home/dexter/steamcmd/ff_ded/FortressForever/bin/server_i486.so" is not at the expected address (wrong library or version mismatch?)
----------------------------------------------
CRASH: Fri Nov 14 00:19:07 MST 2014
Start Line: ./srcds_i486 -game FortressForever -debug -allowdebug -dev +map ff_well
[New LWP 21163]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./srcds_i486 -game FortressForever +map ff_2fort -debug'.
View crash2.txt
CSoundEmitterSystem::AddSoundsFromFile: No such file scripts/npc_sounds_gman.txt
CSoundEmitterSystem: Registered 1550 sounds
CResponseSystem: failed to load scripts/talker/response_rules.txt
*** Error in `/hdd/steamcmd/ff_ded/srcds_i486': free(): invalid pointer: 0xf7d69fa0 ***
writev(4, [{"*** Error in `", 14}, {"./srcds_i486", 12}, {"': ", 3}, {"free(): invalid pointer", 23}, {": 0x", 4}, {"f74eefa0", 8}, {" ***\n", 5}], 7) = 69
(gdb) backtrace
#0 0xf7fdb430 in __kernel_vsyscall ()
#1 0xf7df6337 in raise () from /lib32/libc.so.6
View c_strace2.txt
Process 5742 attached
execve("./srcds_i486", ["./srcds_i486", "-game", "FortressForever", "-dev", "-allowdebug", "+map", "ff_2fort"], [/* 64 vars */]) = 0
[ Process PID=5742 runs in 32 bit mode. ]
brk(0) = 0x901e000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff77b9000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("./tls/i686/sse2/cmov/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("./tls/i686/sse2/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("./tls/i686/cmov/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
View drawm.cs
Draw.AndrewsPitchfork(NinjaScriptBase owner, String tag, Boolean isAutoScale, Int32 anchor1BarsAgo, Double anchor1Y, Int32 anchor2BarsAgo, Double anchor2Y, Int32 anchor3BarsAgo, Double anchor3Y, Brush brush, DashStyle dashStyle, Int32 width)
Draw.AndrewsPitchfork(NinjaScriptBase owner, String tag, Boolean isAutoScale, DateTime anchor1Time, Double anchor1Y, DateTime anchor2Time, Double anchor2Y, DateTime anchor3Time, Double anchor3Y, Brush brush, DashStyle dashStyle, Int32 width)
Draw.AndrewsPitchfork(NinjaScriptBase owner, String tag, Boolean isAutoScale, Int32 anchor1BarsAgo, Double anchor1Y, Int32 anchor2BarsAgo, Double anchor2Y, Int32 anchor3BarsAgo, Double anchor3Y, Boolean isGlobal, String templateName)
Draw.AndrewsPitchfork(NinjaScriptBase owner, String tag, Boolean isAutoScale, DateTime anchor1Time, Double anchor1Y, DateTime anchor2Time, Double anchor2Y, DateTime anchor3Time, Double anchor3Y, Boolean isGlobal, String templateName)
Draw.Arc(NinjaScriptBase owner, String tag, Int32 startBarsAgo, Double s
View barf.erl
-module(fix).
-export([start_link/0, loop0/1, worker/2]).
-define(PORTNO, 2015).
start_link() ->
start_link(?PORTNO).
start_link(P) ->
spawn_link(?MODULE, loop0, [P]).
View cyg_crash.c
#include <stdio.h>
#include <string.h>
int main()
{
char *token;
char *line = "trivial example";
char *search = " ";
token = strtok(line, search);
View annualized_volatility.fs
module yahoo_iv
open System
open System.Net
let stddev(values:seq<float>) =
values
|> Seq.fold (fun acc x -> acc + (1.0 / float (Seq.length values)) * (x - (Seq.average values)) ** 2.0) 0.0
|> sqrt
You can’t perform that action at this time.