Skip to content

Instantly share code, notes, and snippets.

View edisplay's full-sized avatar

edisplay edisplay

View GitHub Profile
@edisplay
edisplay / HTML5-Print.html
Last active August 29, 2015 14:27 — forked from AbhishekGhosh/HTML5-Print.html
HTML5 Print Button
<button onclick="javascript:window.print()">Print This Webpage</button>
@edisplay
edisplay / gist:08575936a444714ca7e0
Created September 24, 2015 16:03 — forked from jazbek/gist:6355989
Add the recurrence schedule to the single event details
<?php
//
add_action('tribe_events_before_view','tribe_recurrence_schedule_meta');
function tribe_recurrence_schedule_meta(){
global $post;
// force this to run only on single event views
if( is_single() && tribe_is_event( $post->ID ) ){
if( tribe_is_recurring_event( tribe_is_recurring_event( $post->ID ) ) ) {
tribe_register_meta( 'tribe_recurrence_schedule', array(
@edisplay
edisplay / tribe_event_get_facebook_link.php
Created September 24, 2015 16:20 — forked from codearachnid/tribe_event_get_facebook_link.php
get the proper Facebook link for events, venue and organizers. Please note if the id is an event it will build the event by the meta id, however the second param gives the option to prettify the link but will require a request to Facebook's API which could slow response
@edisplay
edisplay / tmux-cheatsheet.markdown
Created December 16, 2015 16:48 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@codearachnid
codearachnid / tribe_event_get_facebook_link.php
Created July 23, 2013 23:55
get the proper Facebook link for events, venue and organizers. Please note if the id is an event it will build the event by the meta id, however the second param gives the option to prettify the link but will require a request to Facebook's API which could slow response
@jazbek
jazbek / gist:6355989
Created August 27, 2013 16:42
Add the recurrence schedule to the single event details
<?php
//
add_action('tribe_events_before_view','tribe_recurrence_schedule_meta');
function tribe_recurrence_schedule_meta(){
global $post;
// force this to run only on single event views
if( is_single() && tribe_is_event( $post->ID ) ){
if( tribe_is_recurring_event( tribe_is_recurring_event( $post->ID ) ) ) {
tribe_register_meta( 'tribe_recurrence_schedule', array(
@edisplay
edisplay / gist:3b98edf71a82c6725455
Created January 2, 2016 15:02 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
class Main {
public static void main(String[] args) {
System.out.println("Francisco Cruz");
System.out.println("This morning I came from North Bergen, NJ");
System.out.println("I took a Bus to Porth Authority on 42nd Street, and then");
System.out.println("I took the Seven Train to 33rd Street.");
System.out.println("I learned to code my first program in Java");
System.out.println("I hope to learn to master Java everyday");
}
}
@abhishekdagarit
abhishekdagarit / Disable mouse scroll wheel zoom on embedded Google Maps
Created October 25, 2016 21:29
Disable mouse scroll wheel zoom on embedded Google Maps
Question:
I work on a WordPress site where the authors usually embed Google Maps using iFrames in most posts.
Is there a way to disable the zoom via mouse scroll wheel on all of them using Javascript?
Solution:
I was having the same problem: when scrolling the page then the pointer becomes over the map,
it starts to zoom in/out the map instead of continuing scrolling the page. :(
@stoyanvi
stoyanvi / max_width_email_template.html
Last active December 11, 2017 15:15
HTML Email Template: max-width hack for MS Outlook
<!--[if (gte mso 9)|(IE)]>
<center>
<table>
<tr>
<td width="600">
<![endif]-->
<div style="max-width: 600px; margin: 0 auto;">
<p>This text will be centered and constrained to 600 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>