Skip to content

Instantly share code, notes, and snippets.

View narath's full-sized avatar

Narath Carlile narath

View GitHub Profile
@Chuvisco88
Chuvisco88 / jekyll-cookie-consent.html
Last active May 22, 2024 19:41
An approach on how to add cookie consent to a jekyll page
@ollieatkinson
ollieatkinson / HTTPStatusCode.swift
Last active November 15, 2024 14:04
HTTP status codes as a Swift enum.
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes.
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes.
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum.
enum HTTPStatusCode: Int, Error {
/// The response class representation of status codes, these get grouped by their first digit.
enum ResponseType {
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.
case informational
@leehach
leehach / mm2markdown.xsl
Created November 21, 2013 04:47
Transforms freeplane mm to markdown md. Nodes become headings and subheadings, Notes become paragraphs. Details are not handled. Tested with Pandoc-flavored markdown. May not work: 1. Title blocks 2. Formatting which requires a specific number of spaces
<?xml version="1.0" encoding="UTF-8" ?>
<!--
MINDMAPEXPORTFILTER md;markdown Markdown
v. 0.1
This code released under the GPL. : (http://www.gnu.org/copyleft/gpl.html)
Document : mm2markdown.xsl
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')