Skip to content

Instantly share code, notes, and snippets.

View crockpotveggies's full-sized avatar
🥕
carrot

Justin Long crockpotveggies

🥕
carrot
View GitHub Profile
@nternetinspired
nternetinspired / output-articles-by-collection.liquid
Last active April 25, 2021 02:17
Loop through Jekyll collections and output their content as sections and articles
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting title and full text with good basic html semantics.
Use page.excerpt instead of page.content to grab the first paragraph, blog list style. Markdownify is optional, depends how you authored content in your collections; I typically use Markdown.
{% endcomment % }
{% for collection in site.collections %}
{% assign name = collection.label %}
<section>
@agemooij
agemooij / 1. README.md
Last active September 26, 2018 13:19
Quick spray-routing authentication example

Extremely bare example of Spray routing authentication using session cookies and XSRF tokens

This code was quickly ripped out of an active project to serve as an example. It will not compile in any way!

Any questions? Add them to the comments!

Notes

  • the application uses a version of the cake pattern to compose the Spray routing application together from various traits
  • a lot of those traits should be pretty self-explaining based on their name but if requested I can paste them into this Gist
@mlocher
mlocher / install_play
Created March 31, 2014 08:10
Installing PlayFramework on the Codeship
#!/bin/sh
PLAY_VERSION="2.2.2"
curl -o play-${PLAY_VERSION}.zip http://downloads.typesafe.com/play/${PLAY_VERSION}/play-${PLAY_VERSION}.zip
unzip play-${PLAY_VERSION}.zip
export PATH=$PATH:~/play-${PLAY_VERSION}
play --version
anonymous
anonymous / Weighted selection
Created March 14, 2012 02:35
Weighted Selection
import scala.util.Random
/**
* @author Andrew Conway
*/
object WeightedRandomSelection {
/**
* Get the number of times an event with probability p occurs in N samples.
* if R is res, then P(R=n) = p^n q^(N-n) N! / n! / (N-n)!
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶