Skip to content

Instantly share code, notes, and snippets.

@jorinvo
jorinvo / challenge.md
Last active April 21, 2023 17:14
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@tkafka
tkafka / LICENSE.txt
Last active September 5, 2019 13:38
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@disnet
disnet / let_async.js
Last active December 31, 2015 04:28
sweet.js: async macro
let let = macro {
rule { async $vars ... = $fname ... ($params ...); $rest ...} => {
$fname ... ($params ..., function (err, $vars ...) {
if (err) throw err;
$rest ...
})
}
}
var buffer = new Buffer(1024);
@hiway
hiway / hello.asm
Last active December 18, 2015 19:19
Program that boots an emulator/computer from a floppy and prints 'Hello, world.'
[bits 16] ; Tell assembler to use 16 bit code.
[org 7c00h] ; BIOS will load us to this address.
;===================================================================
mov si, string_hello ; store string pointer into SI
call print_string
call sleep
;===================================================================
print_string: