Skip to content

Instantly share code, notes, and snippets.

View Yogatopia's full-sized avatar
👨‍💻
Coding

Armand Lacle Yogatopia

👨‍💻
Coding
  • Armandlacle.com
  • The Hague, Netherlands
View GitHub Profile
import { Directive } from '@angular/core';
import { ViewController } from 'ionic-angular';
@Directive({
selector: '[hideTabs]'
})
export class HideTabsDirective {
constructor(private viewCtrl: ViewController) {
// hide tabs when view loads
@deltaepsilon
deltaepsilon / index.html
Created July 19, 2016 16:59
Firebase 3.0 Authentication Demo
<!--
Install dependencies with Bower:
bower install PolymerElements/paper-elements#^1.0.7
-->
<html>
<head>
<title>Auth Example</title>
<link rel="shortcut icon" href="/favicon.png" type="image/x-icon">
@ara303
ara303 / tumblr-posts.html
Created December 25, 2013 00:07
Complete HTML and Tumblr shortcodes to render all the post types. I often have to create this, and it's the same every time. Doing this will save me SO MUCH time!
<article class="{PostType}{block:Photoset}set{/block:Photoset}">
{block:Text}
<div class="inner">
<h2{block:Title} class="has-body"{/block:Title}>{Title}</h2>
<div class="body">
{Body}
</div>
</div>
{/block:Text}
@ara303
ara303 / tumblr-lightbox-for-photos.js
Last active December 5, 2018 10:31
Use Tumblr's built-in lightbox to display high resolution photos. I don't necessarily recommend using this anymore as it unnecessarily relies on jQuery, which you may not need. For a vanilla JS version, see: https://gist.github.com/edadams/5ce1ec3d0b1f69e80724af7eb3b606f4
Hey! Just to let you know there is a much better version of this script that doesn't require jQuery here:
https://gist.github.com/edadams/5ce1ec3d0b1f69e80724af7eb3b606f4
For posterity, and because this Gist got unexpectedly popular for a random code snippet, I will preserve the original below. Please do know that I've figured out a much better way to do this, which is above.
$(function(){ // shorthand document.ready()
$('.make_lightbox').each(function(){ // this is just an element I let them click, it carries a series of data- attributes.
$(this).on('click',function(){ // when clicked. this is the newer jQuery click() handler that's only in v1.8+ so that may be something to note.
var lbArray = []; // create blank array.
var arrayContents = {"width":$(this).data('width'), "height":$(this).data('height'), "low_res":$(this).data("lowres"), "high_res":$(this).data('highres')}; // make set of the data- attributes.
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
CmdUtils.CreateCommand({
names: ["php"],
icon: "http://static.php.net/www.php.net/favicon.ico",
description: "Check PHP function specs and comments. (v0.4)",
help: "PHP",
author: {name: "Josue Rodriguez", email: "josue@josuerodriguez.com"},
license: "MIT",
homepage: "http://josuerodriguez.com",
arguments: [
{role: "object", label: 'function', nountype: noun_arb_text}