This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use hyper::net::{NetworkStream,NetworkListener}; | |
use hyper::{Server}; | |
use hyper::server::Request; | |
use hyper::server::Response; | |
use hyper::server::Listening; | |
use hyper::net::Fresh; | |
use hyper; | |
use unix_socket::{UnixStream,UnixListener}; | |
use std::io; | |
use std::path::Path; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
import struct | |
Block = namedtuple('Block', 'next_free prev_free entries pad1 pad2') | |
Quota = namedtuple('Quota', 'id ihardlimit isoftlimit curinodes bhardlimit bsoftlimit curspace btime itime') | |
def read_quota(f): | |
return Quota._make(struct.unpack('<IIIIIIQQQ', f.read(48))) | |
def report_block(f, i): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, TemplateHaskell, DeriveGeneric, GADTs, ScopedTypeVariables, TypeFamilies, FlexibleContexts, MultiParamTypeClasses, DataKinds, FlexibleInstances, StandaloneDeriving #-} | |
import Data.Text(Text) | |
import qualified Data.Text as Text | |
import qualified Data.Text.IO as Text | |
import Data.Attoparsec.Text | |
import Control.Applicative | |
import Control.Monad | |
import Data.Aeson(encode,ToJSON) | |
import Data.Typeable(Typeable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, TemplateHaskell, DeriveGeneric #-} | |
import Data.Text(Text) | |
import qualified Data.Text as Text | |
import qualified Data.Text.IO as Text | |
import Data.Attoparsec.Text | |
import Control.Applicative | |
import Control.Monad | |
import Data.Aeson(encode,ToJSON) | |
import Data.Typeable(Typeable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TemplateHaskell #-} | |
import System.Locale | |
import Data.DateTime | |
import Data.Time | |
import Data.Monoid | |
import Data.Maybe (fromJust,isJust) | |
import Data.Functor.Identity | |
import Data.Text (Text) | |
import Data.Map.Lazy (Map) | |
import qualified Data.Map.Lazy as Map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting with version 0.13 PCM audio support was introduced using | |
PortAudio library. The PortAudio2 version 19 or higher must be | |
installed on the system to use this feature | |
(http://portaudio.com/docs/v19-doxydocs/tutorial_start.html). | |
It's possible to use the library supplied with the emulator. For Unix-like | |
systems, the priority is given to the installed library. The library is | |
optional (only needed for PCM audio). | |
In version 0.16 it has become possible to export and import images in the most | |
common image formats. To save a copy of the screen, select the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_main] | |
extern crate libc; | |
use std::ptr; | |
use std::io::File; | |
use std::io::fs; | |
use std::io::BufferedReader; | |
use std::c_str::CString; | |
use libc::funcs::posix88::unistd::getuid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_main] | |
extern crate libc; | |
use std::ptr; | |
use std::io::File; | |
use std::io::fs; | |
use std::io::BufferedReader; | |
use std::c_str::CString; | |
use libc::funcs::posix88::unistd::getuid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE PackageImports, StandaloneDeriving #-} | |
import Text.HTML.TagSoup | |
import Data.Maybe (fromJust) | |
import Data.Monoid | |
import Control.Monad | |
import Control.Applicative | |
import "mtl" Control.Monad.Trans | |
import Network.Curl | |
import Codec.Text.IConv | |
import Codec.Binary.UTF8.String (decodeString) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "syscall" | |
import "log" | |
import "runtime" | |
import "flag" | |
import "fmt" | |
import "strconv" | |
import "os" | |
import "os/signal" |