Skip to content

Instantly share code, notes, and snippets.

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active June 3, 2024 07:24
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@tfausak
tfausak / styles.less
Last active August 27, 2016 13:19
Make Haskell module specifiers less important in Atom. https://twitter.com/taylorfausak/status/769312949353652228
// the reasonable option
::shadow .haskell .entity .module,
::shadow .haskell .identifier .module {
opacity: 0.5;
}
// the nuclear option
::shadow .line:not(.cursor-line) .haskell .entity .module,
@SunDi3yansyah
SunDi3yansyah / .gitignore
Created August 26, 2016 11:12 — forked from WattsInABox/.gitignore
Generate Static HTML Website Using Ruby on Rails
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors)
/out
@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 #-}
@ivar
ivar / spacemacs global search and replace.md
Last active August 1, 2022 00:04
spacemacs - global search and replace

There's a couple of ways, one way is

  • Get search results
    • Do SPC / and type in your search string
    • or SPC x S and search string - where x is your scope indicator (p for project, d for directory, etc..)
  • Once you have the occurences you want, hit C-c C-e inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like that
  • in that buffer you can use any commands you'd normally use on a buffer
  • the C-c C-c to commit your changes.
@sdieunidou
sdieunidou / rabbitmq.txt
Created October 22, 2015 19:51
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
@henrik
henrik / regex_case.exs
Last active September 21, 2022 03:06
Proof-of-concept of an Elixir construct like `case` but that matches strings against regexps. #elixirlang
defmodule RegexCase do
defmacro regex_case(string, do: lines) do
new_lines = Enum.map lines, fn ({:->, context, [[regex], result]}) ->
condition = quote do: String.match?(unquote(string), unquote(regex))
{:->, context, [[condition], result]}
end
# Base case if nothing matches; "cond" complains otherwise.
base_case = quote do: (true -> nil)
new_lines = new_lines ++ base_case
@tristanm
tristanm / README.md
Last active May 13, 2024 06:16
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing