Skip to content

Instantly share code, notes, and snippets.

View elrikdante's full-sized avatar

Dante Haskell Elrik elrikdante

View GitHub Profile
@bogdibota
bogdibota / Layout.js
Created June 14, 2017 08:19
next.js and material-ui
import { Component } from 'react';
import styled from 'styled-components';
import { MuiThemeProvider, getMuiTheme } from 'material-ui/styles';
import injectTapEventPlugin from 'react-tap-event-plugin';
import AppBar from 'material-ui/AppBar';
if (typeof window !== 'undefined') {
injectTapEventPlugin();
}
@rvcas
rvcas / perhaps.elm
Last active May 3, 2017 16:04
Some nonsense in Elm
module Main exposing (..)
import Html
type Maybe a
= Just a
| Nothing
@varenc
varenc / pet-snippet.toml
Last active May 15, 2025 20:37
description
[[Snippets]]
Description = "my personal snippets. Relies on many of my own functions. If you're interested in pmset/disabling assertions, see: https://gist.github.com/varenc/627f6be2a5ec9d52dab3cf0d157be62f"
Output = ""
Tag = []
command = ""
[[Snippets]]
Description = "start dev file syncer. uses fswatch to know when to run rsync. does not sync .git file. Sort like a write-through cache network file system with only eventual consistency guarantees."
Output = ""
This file has been truncated, but you can view the full file.
1 " '"
1 " Time columns will become time zone aware in Rails 5.1. This\n still causes `String`s to be parsed as if they were in `Time.zone`,\n and `Time`s to be converted to `Time.zone`.\n\n To keep the old behavior, you must add the following to your initializer:\n\n config.active_record.time_zone_aware_types = [:datetime]\n\n To silence this deprecation warning, add the following:\n\n config.active_record.time_zone_aware_types = [:datetime, :time]\n"
1 " WARNING: Active Record does not support composite primary key.\n\n "
1 " def "
1 " "
1 " CONSTRAINT "
1 " Passing string to define callback is deprecated and will be removed\n in Rails 5.1 without replacement.\n"
1 " Returning `false` in Active Record and Active Model callbacks will not implicitly ha

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik

Concepts

  • Immutable Data
  • Second-order Functions
@jpillora
jpillora / s3get.sh
Last active March 31, 2025 15:54
S3 signed GET in plain bash (Requires openssl and curl)
#!/bin/bash
#set these in your environment/profile (NOT HERE)
AWS_ACCESS_KEY=""
AWS_SECRET_KEY=""
function s3get {
#helper functions
function fail { echo "$1" > /dev/stderr; exit 1; }
#dependency check
Not all of them are blogs (some are weekly newsletters)
http://rubyweekly.com/
https://rubythursday.com/
http://rubyfacets.com/
http://blog.appsignal.com/
https://www.toptal.com/developers/blog/tags/ruby
http://www.nateberkopec.com/ (blogs about ruby and other stuff)
http://solnic.eu/ (author of ROM, dry-rb gems etc)
https://twin.github.io/
@tilarids
tilarids / tiny_hello.asm
Created September 23, 2016 00:49
A minimal Mach-o x32 executable for OS X El Capitan (with proper padding and symtable)
; A minimal Mach-o x32 executable for OS X El Capitan (with proper padding and symtable)
;
; Original (pre 10.10.5) version - https://gist.github.com/softboysxp/1084476
; $ nasm -O0 -f bin -o tiny_hello tiny_hello.asm
; $ chmod +x tiny_hello
; $ ./tiny_hello
; (returns 42)
; $
; c.f.
@dysinger
dysinger / README.lhs
Last active February 9, 2022 18:07
Single-file executable literate Haskell with Stack
#!/usr/bin/env stack
> -- stack --resolver lts-6 --install-ghc runghc --package classy-prelude --package lens --package wreq
Blah Blah words about this single file executable README goes here.
> {-# LANGUAGE DeriveAnyClass #-}
> {-# LANGUAGE DeriveGeneric #-}
> {-# LANGUAGE NoImplicitPrelude #-}
> {-# LANGUAGE OverloadedStrings #-}
import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
const Example = ({items, removeItemHandler}) => {
return (
<div>
<ReactCSSTransitionGroup transitionName="example" transitionEnterTimeout={700} transitionLeaveTimeout={700}>
{items.map(function(item) {
return (
<div key={item.id} className="todo-item" onClick={removeItemHandler.bind(null, item)}>