Skip to content

Instantly share code, notes, and snippets.

View jdiez17's full-sized avatar

José Manuel Díez jdiez17

View GitHub Profile
module Sudoku where
import Control.Monad (guard)
data Digit = D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9
deriving (Eq, Ord, Read, Enum)
mkDigit :: Int -> Maybe Digit
mkDigit n
| n > 0 && n < 10 = Just $ toEnum (n-1)
{
"result": [
{
"hash": "7f40b49335b9",
"items": [
{
"compression": 1.0,
"extras": [],
"files": [
{
body {
font-family: "Open Sans", sans-serif;
}
[jdiez@InfiniteImprobabilityDrive ~]$ openssl s_client -connect api.github.com:443
CONNECTED(00000003)
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 High Assurance Server CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/ST=California/L=San Francisco/O=GitHub, Inc./CN=*.github.com
i:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
1 s:/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA
type Connection struct {
socket io.ReadWriteCloser
listeners []chan []byte
outgoing chan []byte
}
func(c *Connection) manage() {
buffer := make([]byte, 1000)
for {
select {
case out := <-c.outgoing:
c.socket.Write(out)
default:
n, err := c.socket.Read(buffer)
if err != nil {
{
'remotes': [
{
host: 'example.com',
root: '/var/prisync/',
mirror: '~/.prisync/mirrors/example.com/'
},
],
'mappings': [
local_path: '~/Documents',
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
jA0ECQMCYKV4GHQRz8O20kIBbbLV52E06yptnS8KOkaGCazO8frTe9UxmxvqjKlb
TpjUm9Zfqb/1Cqi2XVUHUSU9mAjXzUamSYN9yyxH8kAeMUM=
=S8j+
-----END PGP MESSAGE-----
$ curl -X DELETE https://mediacru.sh/api/v2/hash1,hash2,hash3
[
{"success": true, "hash": hash1},
{"success": false, "error": 404, "hash": hash2},
{"success": false, "error": 403, "hash": hash3}
]
{
"Miscellaneous": {
"rleCompress": {
"sections": {
"Inputs": {
"DE": "Destination, cannot (yet) be the same location as original data",
"HL": "Data to compress",
"BC": "Size of uncompressed data"
},
"Outputs": {