Skip to content

Instantly share code, notes, and snippets.

#define _BSD_SOURCE /* Get getpass() declaration from <unistd.h> */
#define _XOPEN_SOURCE /* Get crypt() declaration from <unistd.h> */
#include <unistd.h>
#include <limits.h>
#include <pwd.h>
#include <shadow.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DerivedPropertyDemo
{
class Program
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Artemis;
using Microsoft.Xna.Framework;
using Roguelike.components;
namespace Roguelike.utils
@Zolomon
Zolomon / composite.rs
Created August 31, 2013 18:33
It works! \o/ Thank you #rust@irc.freenode.net <3
fn main() {
struct GoalExplore {
name: ~str
}
struct GoalRest {
name: ~str
}
@Zolomon
Zolomon / make.txt
Created August 31, 2013 21:14
What's causing this build error?
➜ rust git:(master) make
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: using gcc
cfg: no pandoc found, omitting docs
cfg: no node found, omitting docs
cfg: no llnextgen found, omitting grammar-verification
data FileSystem = File Name
| Directory Name [FileSystem]
search :: String -> FileSystem -> String
search target (Directory name (x:xs)) = ""
@Zolomon
Zolomon / rearrange.hs
Last active September 21, 2024 04:15
Calculate best rearrange in Discworld MUD.
module Rearrange where
import Control.Applicative
import Data.List
main :: IO ()
main = do
putStrLn $ show (getMaxStats maPo)
data Stats = Stats { str :: Int,
@Zolomon
Zolomon / faust.scala
Created June 15, 2014 10:55
Adventures in Scala
import java.io._
import com.github.tototoshi.csv.CSVReader
import scala.collection.mutable.ListBuffer
import scala.io.Source
case class Publisher(name: String)
case class Book(isbn: String, publishers: Option[List[Publisher]])
@Zolomon
Zolomon / repeater.py
Created August 6, 2014 07:58
Simulate some terminal output
import argparse
import random
import time
class Repeater(object):
def __init__(self, filename, minTimeToNextLine, maxTimeToNextLine):
self.filename = filename
self.minTime = minTimeToNextLine
self.maxTime = maxTimeToNextLine
@Zolomon
Zolomon / curioustypes.hs
Created November 28, 2014 14:35
Studying for exam in Haskell
func = \f g x -> f (g x)
func2 = \g x -> (.) (g x)
func3 = \g x -> (\g2 x2 -> g x (g2 x2))
f1 = (($)$($))
f2 = (($)($))