Skip to content

Instantly share code, notes, and snippets.

@wenjul
wenjul / placeholder.css
Created June 19, 2013 11:10
兼容不支持placeholder的浏览器
.placeholder{color:#A2A2A2;}
::-webkit-input-placeholder { /* WebKit browsers */
color:#A2A2A2;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color:#A2A2A2;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color:#A2A2A2;
}
@jwilm
jwilm / mongodb.service
Created June 22, 2013 22:49
MongoDB systemd service unit configuration
[Unit]
Description=MongoDB Database Service
Wants=network.target
After=network.target
[Service]
Type=forking
PIDFile=/var/run/mongodb/mongod.pid
ExecStart=/usr/local/bin/mongod --config /etc/mongod.conf
ExecReload=/bin/kill -HUP $MAINPID
@noxan
noxan / namegenerator.py
Last active August 28, 2024 11:16
A simple python script to generate random names.
#!/usr/bin/python3
import random
import string
import sys
VOWELS = "aeiou"
CONSONANTS = "".join(set(string.ascii_lowercase) - set(VOWELS))
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active August 2, 2025 20:29
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@timstermatic
timstermatic / gist:6163577
Last active July 31, 2016 12:46
Async unique validation with expressjs and mongoose
var mongoose = require('mongoose')
,Schema = mongoose.Schema
,ObjectId = Schema.ObjectId;
var userSchema = new Schema({
email: String,
password: String,
@ramiabraham
ramiabraham / mixins
Created August 9, 2013 02:34
just some mixins
@function black($opacity){
@return rgba(0,0,0,$opacity)
}
@function white($opacity){
@return rgba(255,255,255,$opacity)
}
@mixin box-emboss($opacity, $opacity2){
box-shadow:white($opacity) 0 1px 0, inset black($opacity2) 0 1px 0;
}
@mixin reset-text-rendering
{
/*
* See: http://www.usabilitypost.com/2012/11/06/optimize-legibility/
*/
text-rendering: optimizeLegibility;
/*
* Prevents the browser from using synthesized font-weights.
@falcondai
falcondai / install-fonts.sh
Last active February 5, 2016 19:36
install all fonts files under a directory recursively (for Ubuntu).
#!/bin/bash
echo installing fonts at $PWD to ~/.fonts/
find . -name '*.ttf' -exec cp \{\} ~/.fonts/ \;
find . -name '*.otf' -exec cp \{\} ~/.fonts/ \;
echo finished installing
@yanghu
yanghu / git-commands.md
Last active July 10, 2016 15:34
Useful Git commands

##Useful Git Commmands and Tips

Ignore files locally###

add the files you want to ignore to .git/info/exclude, this file will not be shared with other remotes, so only the local repo will ignore those files.

###Show information###

  • git log/show command
git log --graph --oneline #show history
@A973C
A973C / example.css
Created August 26, 2013 05:56
Custom Scrollbars in WebKit
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: none;
}
::-webkit-scrollbar-thumb {
background: -webkit-linear-gradient(left, #547c90, #002640);