Skip to content

Instantly share code, notes, and snippets.

View davekiss's full-sized avatar

Dave Kiss davekiss

View GitHub Profile
/* Smartphones (portrait and landscape) */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px) {
}
/* Smartphones (landscape) */
@media only screen
and (min-width: 321px) {
vimeo : {
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
params : {
autoplay : 1,
hd : 1,
show_title : 1,
show_byline : 1,
show_portrait : 0,
fullscreen : 1
},
@davekiss
davekiss / gist:8945377
Last active October 27, 2015 17:15
Bedrock Usage

##Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew upgrade
brew update
brew doctor
> Your system is ready to brew.

##Install and Update XCode from the App Store

<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
<p>body</p>
</body>
</html>
@davekiss
davekiss / gist:a3f58ae284bde8397cb6
Last active June 19, 2016 21:28
Localizing and Translating WordPress Plugins

1. Load the Text Domain

add_action( 'init', array($this, 'vimeography_load_text_domain') );

public function vimeography_load_text_domain() {
  load_plugin_textdomain('vimeography', false, dirname( VIMEOGRAPHY_BASENAME ) . '/languages/');
}

2. Localize Strings

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@davekiss
davekiss / Api.php
Last active August 29, 2015 14:21
Low Level ORM
<?php
class API {
/**
* Create a new section for a given course.
*
* @return mixed
*/
public function create() {
$course = WP_Coach_Course::find( 1 );
# config/initializers/reimbursement_hook.rb
Rails.application.config.to_prepare do
Spree::Reimbursement.reimbursement_success_hooks = [
->(reimbursement) { puts reimbursement }
]
end
@davekiss
davekiss / 000_postgresql_fancy_datatypes
Created April 24, 2016 14:14 — forked from pcreux/000_postgresql_fancy_datatypes
Postgresql fancy datatypes with Rails / ActiveRecord. Run it with `rake`!
# Postgresql fancy datatypes!
* array
* hstore (=~ hash)
* json
* jsonb
Philippe Creux - [@pcreux](http://twitter.com/pcreux)
#1. Update Bootstrap compatibility in /assets/scripts/main.js
// Import npm dependencies
// import 'bootstrap/dist/js/umd/util.js';
// import 'bootstrap/dist/js/umd/alert.js';
// import 'bootstrap/dist/js/umd/button.js';
// import 'bootstrap/dist/js/umd/carousel.js';
// import 'bootstrap/dist/js/umd/collapse.js';
// import 'bootstrap/dist/js/umd/dropdown.js';
// import 'bootstrap/dist/js/umd/modal.js';