Skip to content

Instantly share code, notes, and snippets.

@codepony
codepony / rows.hs
Last active December 15, 2015 22:18
Simple rows script, done as a task for #coders@prooops
{- Simple rows script, done as a task for #coders@prooops
- improved by e (thx. for that) -}
import Control.Applicative -- needed for <$> (equal to mapM)
import Control.Monad
main = do
putStrLn "How many rows do you want to print?"
y <- read <$> getLine :: IO Int
let rowsOut = createAstLst y <$> [1..(2*y-1)]
forM rowsOut putStrLn
@codepony
codepony / simple_syntax_examples.hs
Last active December 15, 2015 19:18
Very simple haskell code snips - to show the syntax to others, and explain the very basic functions of haskell. written by d3f <identi.ca/d3f>
{- These are some simple syntax examples written in haskell
- This file was written by d3f<identi.ca/d3f>, just because.
- You are free to use, share and modify those as you wish.
-
- To run and try some haskell-code & scripts, you may need
- The haskell-platform <http://www.haskell.org/platform/>
-}
-- A very simple function
@codepony
codepony / lib.twitter.js
Created March 10, 2013 13:38
Used to get hotot working with identica again (Be aware: twitter support will be fucked up after changing to that file) Also: `Retweets by me' shows the public timeline now. (Licensed under the LGPLv3 by lyricat - https://github.com/lyricat/ )
// vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
if (typeof(lib) == 'undefined') var lib = {};
if (typeof(lib.twitter) == 'undefined') lib.twitter = {};
function TwitterClient() {
var self = this;
self.use_oauth = false;
self.username = '';
self.password = '';
@codepony
codepony / rows.lisp
Last active December 14, 2015 08:49
CommonLisp "rows" done for a task @ prooops #coders
; Simple print-rows for prooops #coders
; Print * (+1 for every row) and in the middle print as may stars as there are rows. (rows marks the middle)
#|
Example:
rows = 5
*
**
***
****
********* (9*)
#|
washi.lisp moved away to github:
https://github.com/codepony/washi.lisp
Please get it from there now. Good bye!
|#
(format t "We git now: https://github.com/codepony/washi.lisp~%")
@codepony
codepony / ceasars_cipher.lisp
Last active December 11, 2015 03:58
Substitution cipher written in CLISP.
#|
| Subtitution cipher written in CLISP
| - used rot13.lisp as core here - (https://gist.github.com/4530170)
|
ceasars_cipher.lisp version 0.0.1
Copyright (C) 2012 @d3f (http://identi.ca/d3f)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
@codepony
codepony / rot13.lisp
Last active December 11, 2015 02:19
Simple rot13 encoder written in CLISP.
#|
| A Simple rot13 - encoder written in CLISP
|
rot13.lisp version 0.0.1
Copyright (C) 2012 @d3f (http://identi.ca/d3f)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
@codepony
codepony / an_evolution.lisp
Last active December 10, 2015 16:18
Moved to git: https://github.com/codepony/an_evolution.lisp Simple 'life-simulation' written in CLISP. Licensed under the AGPLv3+ by d3f - identi.ca/d3f
#|
an_evolution.lisp moved away to github:
https://github.com/codepony/an_evolution.lisp
Please get it from there now. Good bye!
|#
(format t "We git now: https://github.com/codepony/an_evolution.lisp~%")