Skip to content

Instantly share code, notes, and snippets.

@incredimike
incredimike / variousCountryListFormats.js
Last active May 31, 2024 23:54
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//
@aemkei
aemkei / LICENSE.txt
Last active April 12, 2024 21:27 — forked from 140bytes/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@zachharkey
zachharkey / CSSToggle.py
Created February 12, 2012 03:05
SublimeText2 Module Toggle CSS format between single and multiline
import sublime, sublime_plugin, re
DEBUG_ENABLED = False
PRINT_CONTEXT = False
# Toggle between single-line or multi-line formatted css statement
#
# Add the following line to Preferences > Key Bindings - User
# { "keys": ["ctrl+shift+j"], "command": "toggle_single_line_css" }
#
@iznax
iznax / Readme.md
Created February 23, 2012 04:24
Mini Tetris in less than 140 bytes

Mini Tetris

A slightly more well-behaved version of Tetris than some other 140 byte projects. The left and right sides of the screen block player movement. The game view is larger and the width and height of the screen are included as constants you can manipulate.

Play 140-character Version

I made a more accurate version of the game with proper all the rotating pieces. This of course is larger and the core logic takes 256 characters.

Play Full Version

@pbrisbin
pbrisbin / install.md
Last active August 25, 2021 14:06
Installing OpenCart on Heroku

Installation

This gets OpenCart running enough that we can use the GUI Installer

  1. Create Heroku project with ClearDB MySQL add-on
  2. Download OpenCart sources
  3. Move ./upload/* to top-level (those are the PHP site files)
  4. Copy zlib.so into ./ext/zlib.so
  5. Write extension = /app/www/ext/zlib.so into php.ini
  6. Push
@dmiddlecamp
dmiddlecamp / emailDemo.cpp
Created February 11, 2014 20:04
A pretty rough example for sending an emil!
#define SMTP_SERVER "smtp.yourserver.com"
#define SMTP_USER_BASE64 "base64_encode_your_user"
#define SMTP_PASS_BASE64 "base64_encode_your_pass"
#define SMTP_FROM_EMAIL "email@from.com"
#define SMTP_TO_EMAIL "email@to.com"
#define SMTP_SUBJECT "Email from a Core!"
#define SMTP_BODY "Body body body"
#include "application.h"
var defaults = {
number: 1,
bool: true,
magic: 'real',
animal: 'whale',
croutons: 'delicious'
};
var options = {
number: 2,
@jshcrowthe
jshcrowthe / fibonacci.js
Created May 14, 2015 01:58
Fibonacci Sequence (The cool way)
var fibonacci = function(n) {
return Array.apply(null, Array(n))
.reduce(function(sequence, value, index) {
return sequence.concat((index < 2) ? index : sequence[index - 1] + sequence[index - 2]);
}, []);
};
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@gbaman
gbaman / HowToOTGFast.md
Last active May 14, 2024 10:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i