Skip to content

Instantly share code, notes, and snippets.

View simg's full-sized avatar

Simon Gardner simg

View GitHub Profile
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
/** @jsx React.DOM */
define(['react'], function(React) {
var MenuItem = React.createClass({
handleMenuClick: React.autoBind(function() {
this.props.eventBus.emit('navigate.page.start', {page: this.props.data.page});
}),
render: function(){
var active = this.props.isActive === true ? 'active' : '';
return <li class={active}><a href="javascript:void(0)" onClick={this.handleMenuClick}><span class="hidden-tablet">{this.props.data.text}</span></a></li>;
@mani95lisa
mani95lisa / install inotify-tools on centos.sh
Created September 28, 2013 10:22
install inotify-tools on centos.sh
wget http://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
tar -zxvf inotify-tools-3.14.tar.gz
cd inotify-tools-3.14
./configure
make
make install
updatedb
//gulp & plugins
var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var browserify = require('gulp-browserify');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var mocha = require('gulp-mocha');
var nodemon = require('gulp-nodemon');
var livereload = require('gulp-livereload');
@paf31
paf31 / node-haskell.md
Last active May 14, 2024 03:51
Reimplementing a NodeJS Service in Haskell

Introduction

At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.

Over the past few months, I have been working on two Haskell services:

  • A reimplementation of an existing socket.io service, previously written for NodeJS using TypeScript.
  • A new service, which would interact with third-party components using standard data formats from the medical industry.

I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces

@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sloosch
sloosch / ClickCounter.purs
Created May 6, 2016 10:35
Adapt State and Actions
module ClickCounter where
import Prelude
import Component as C
import Pux.Html as H
import Pux.Html.Events as E
import Data.Generic (class Generic)
type State = Int
@wojteklu
wojteklu / clean_code.md
Last active July 17, 2024 05:49
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@ldez
ldez / gmail-github-filters.md
Last active July 16, 2024 09:41
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label