Skip to content

Instantly share code, notes, and snippets.

View bluetidepro's full-sized avatar
🍕
🐺

Zach Reed bluetidepro

🍕
🐺
View GitHub Profile
@bluetidepro
bluetidepro / social_stuff.php
Created February 15, 2012 17:31 — forked from srcoley/social_stuff.php
Social Stuff
<?php
/*
* Plugin Name: Social Stuff
* Description: Allows users to befriend or follow one-another. Also tracks events such as commemts and follows so they they can be displayed in an activity feed.
* Version: 0.1
* Author: Stephen Coley
* Author URI: http://coley.co
* License: GPL2
*
*
@ellerrs
ellerrs / gist:4989962
Last active December 13, 2015 23:09
proposed product schema
var ProductSchema = new Schema({
categoryId: String
, department: String
, ean: String
, model: String
, weight: String
, dimensions: {
height: String
, width: String
, length: String
@kentbrew
kentbrew / dogecoin_button.html
Last active January 1, 2016 02:18
dogecoin button ... wow ... such generous!
<html>
<head>
<style>
a.doge {
position: relative;
display: inline-block;
height: 40px;
margin: 0 0 0 20px;
font-size: 12px;
# Step 1: request and download your twitter archive
# Step 2: create a twitter app (on their dev site) so you can fill out the key and secret data
# Step 3: run, and prosper
require 'twitter'
require "json"
USERNAME = 'YOURUSERNAME'
ARCHIVE_PATH = '/YOUR/DOWNLOADS/FOLDER/data/js/tweets'
anonymous
anonymous / scratchpad.js
Created December 17, 2012 19:29
$(function(){
// Scratchpad Intro
//--------------------------------------------------------------------------------
var intro =
['<style>',
' body {background: #DDD6B2;}',
' .container {',
' background: #fff;',
@muan
muan / details-links.md
Last active December 21, 2019 10:34
Details on details cheatsheet.
@Victa
Victa / gist:1209370
Created September 11, 2011 09:13
Font sizing with REM and PX (LESS)
// ABOUT
A simple LESS (http://lesscss.org) snippet based on http://snook.ca/archives/html_and_css/font-size-with-rem
It doesn't do much but saves you typing things twice, allowing you to use rem as a unit for font-sizes
and giving a px fallback for IE
// MIXIN
.font-size(@font-size: 16){
@rem: (@font-size / 10);
font-size: @font-size * 1px;
font-size: ~"@{rem}rem";
@daybreaker
daybreaker / reactions.rb
Last active May 11, 2022 12:41
Ruby script to check slack reaction counts
require 'slack-ruby-client' # first, make sure you do: gem install slack-ruby-client
require 'date'
# Add your Slack API token here
token = [YOUR TOKEN HERE]
Slack.configure do |config|
config.token = token
end
@nijikokun
nijikokun / example-user.js
Created May 3, 2012 20:46
Beautiful Validation... Why have I never thought of this before?!
var user = {
validateCredentials: function (username, password) {
return (
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' }
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' }
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' }
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' }
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' }
: false
);
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google