Skip to content

Instantly share code, notes, and snippets.

@cdharrison
cdharrison / css-preprocessor-libraries.md
Created October 17, 2013 11:40
CSS Preprocessor Frameworks + Mixin Libraries

Frameworks/Mixin Libraries

@mattmcmanus
mattmcmanus / Learning.markdown
Last active February 8, 2019 19:03
React Best Practices - Lessons learned after a couple months of using React

React Best Practices - Lessons learned after a couple months of using React

These are some things I've found helpful after doing React for a couple months. It's possible these practices are short sighted and will cause other problems, I just haven't hit those bumps in the road yet.

This list started after reading this phenomincal article on React Tips and Best Practicies.

1. Always define your propTypes. Always.

Think of propTypes as a love letter to whatever developer will work on a component after you. Your components should be as declarative as possible. React's error messaging is so clear and helpful and this will make things so much easier.

/* This is intentionally blank just and exists to secure a decent gist name */
@border
border / Makefile
Created January 12, 2011 01:36
json example in golang
include $(GOROOT)/src/Make.inc
GOFMT=gofmt -spaces=true -tabindent=false -tabwidth=4
all:
$(GC) jsontest.go
$(LD) -o jsontest.out jsontest.$O
format:
$(GOFMT) -w jsontest.go
@rainly
rainly / slideshare-downloader.sh
Created March 2, 2012 08:58 — forked from giudinvx/slideshare-downloader.sh
Slideshare Downloader
#!/bin/bash
# Author: Andrea Lazzarotto
# http://andrealazzarotto.com
# andrea.lazzarotto@gmail.com
# Slideshare Downloader
# This script takes a slideshare presentation URL as an argument and
# carves all the slides in flash format, then they are converted to
# and finally merged as a PDF
@teiko
teiko / directory_listing.rb
Created April 22, 2012 16:47
Directory Listing Plugin for Jekyll
# Title: Directory Listing Plugin for Jekyll
# Author: Simon Heimlicher http://simon.heimlicher.com
# Description: Display list of pages and directories beneath current directory
# Configuration: You can set default title in _config.yml as follows:
# directory_listing_title: "Contents: "
# directory_listing_prefix: "Contents of "
#
# Syntax {% directory_listing Title of Listing %}
#
# Example 1:
@raineorshine
raineorshine / memrise-export.js
Last active December 1, 2021 17:02
Export Memrise course words to CSV. There is also a Chrome Extension: https://chrome.google.com/webstore/detail/memrise-export/hcllgkpmoiolndnhmbdceffaidjmkoam
/*
UPDATE: This is now a Chrome Extension: https://chrome.google.com/webstore/detail/memrise-export/hcllgkpmoiolndnhmbdceffaidjmkoam
Source Code: https://github.com/raineorshine/memrise-export
Export Memrise course words to CSV (technically TSV, or "tab separated file", but it is effectively the same).
1. Log into Memrise.
2. Navigate to the course page you would like to export (e.g. https://app.memrise.com/course/2156672/german-random-01/).
3. Open the browser's Developer Console (https://support.airtable.com/hc/en-us/articles/232313848-How-to-open-the-developer-console)
@perusio
perusio / gist:1326701
Created October 31, 2011 01:28
Mobile device detection in Nginx with just 7 lines of configuration
### Testing if the client is a mobile or a desktop.
### The selection is based on the usual UA strings for desktop browsers.
## Testing a user agent using a method that reverts the logic of the
## UA detection. Inspired by notnotmobile.appspot.com.
map $http_user_agent $is_desktop {
default 0;
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule
~*spider|crawl|slurp|bot 1; # bots
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes
@sirin
sirin / turkish_pos_tagger.py
Last active May 1, 2022 03:29
This file contains Turkish POS tagger which is created by using Brill tagger.
# -*- coding: utf-8 -*-
'''
Turkish POS Tagger
Author: Sirin Saygili <sirin.neslihan@gmail.com>
Turkish POS Tagger is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Turkish POS Tagger is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@honkskillet
honkskillet / byte-sizetuts.md
Last active June 18, 2022 14:18
A series of golang tutorials with youtube videos.