Skip to content

Instantly share code, notes, and snippets.

@chalin
chalin / main.dart
Created May 9, 2017 21:38
Todo-list generator for webdev.dartlang.org/guides/get-started
void main() {
thingsTodo().forEach(print);
}
Iterable<String> thingsTodo() sync* {
var actions = ['Walk', 'Wash', 'Feed'];
var pets = ['cats', 'dogs'];
for (var action in actions) {
for (var pet in pets) {
@munchicken
munchicken / htaccess
Last active December 16, 2022 10:56 — forked from dave1010/htaccess
HTTP Status Cats Apache (htaccess) config
# HTTP Status Cats
# Apache (htaccess) config originally created by @dave1010,
# rebuilt by Sarah Pierce (see modifications section)
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
@kublaj
kublaj / textStorage.js
Created August 15, 2016 08:46 — forked from sofish/textStorage.js
Cross-browser TextStorage Solution
/**
* @ NAME: Cross-browser TextStorage
* @ DESC: text storage solution for your pages
* @ COPY: sofish, http://sofish.de
*/
typeof window.localStorage == 'undefined' && ~function () {
var localStorage = window.localStorage = {},
prefix = 'data-userdata',
doc = document,
@ebidel
ebidel / fancy-tabs-demo.html
Last active February 18, 2025 15:38
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script src="https://unpkg.com/@webcomponents/custom-elements"></script>
<style>
body {
margin: 0;
}
/* Style the element from the outside */
/*
fancy-tabs {
margin-bottom: 32px;
@totya24
totya24 / gulpfile.js
Last active December 13, 2016 11:51
Our gulpfile
var gulp = require('gulp');
var gutil = require('gulp-util');
var autoprefixer = require('gulp-autoprefixer');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var cleanCSS = require('gulp-clean-css');
var newer = require('gulp-newer');
var uglify = require('gulp-uglify');
var order = require("gulp-order");
var cssBase64 = require('gulp-css-base64');
@totya24
totya24 / index.php
Created July 13, 2016 08:26
Google Page Insight
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="utf-8">
<title>Page insights</title>
</head>
<body>
<form method="POST" action="">
<input type="text" name="url" placeholder="url"><input type="submit" value="Get insights" />
</form>
@thomd
thomd / cli-services.md
Last active January 17, 2019 16:07
Services for CLIs

Weather

  • curl -4 wttr.in/hamburg

Network

  • curl ipinfo.io
  • curl https://ifconfig.me
anonymous
anonymous / my.css
Created January 21, 2016 11:59
CSS Gradient Animation
background: linear-gradient(270deg, #387b6a, #155645, #b7cac5, #73aa9c);
background-size: 800% 800%;
-webkit-animation: AnimationName 30s ease infinite;
-moz-animation: AnimationName 30s ease infinite;
-o-animation: AnimationName 30s ease infinite;
animation: AnimationName 30s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@thomd
thomd / streaming-server.js
Last active June 1, 2016 13:15
a streaming node server
var http = require('http');
http.createServer(function (request, response) {
response.setHeader('Content-Type', 'text/html; charset=UTF-8');
//response.setHeader('Transfer-Encoding', 'chunked');
var html =
'<!DOCTYPE html>' +
'<html lang="en">' +
'<head>' +
@totya24
totya24 / index.php
Last active June 23, 2016 08:22
jQuery method usage statistic
<?php
/** included from: https://github.com/neitanod/forceutf8 */
class Encoding {
const ICONV_TRANSLIT = "TRANSLIT";
const ICONV_IGNORE = "IGNORE";
const WITHOUT_ICONV = "";
protected static $win1252ToUtf8 = array(
128 => "\xe2\x82\xac",