Skip to content

Instantly share code, notes, and snippets.

View arekgotfryd's full-sized avatar
👽
Working from home

Arkadiusz arekgotfryd

👽
Working from home
View GitHub Profile
@jervert
jervert / isLeapYear.js
Created January 9, 2014 14:03
Hypersimple leap year verify for Javascript
function isLeapYear(year) {
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
}
FROM ubuntu:12.04
MAINTAINER SKAhack
run echo "deb http://archive.ubuntu.com/ubuntu quantal main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN apt-get install -y openssh-server
RUN apt-get install -y sudo
RUN mkdir -p /home/docker
@willurd
willurd / web-servers.md
Last active July 18, 2025 18:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@reyjrar
reyjrar / elasticsearch.yml
Last active December 26, 2024 21:46
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
@marijn
marijn / README.markdown
Last active June 4, 2025 13:55
List of countries in YAML, CSV and TXT format