This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EnumKeyedContainer.swift | |
// Salpicon | |
// | |
// Created by Alexander Ruiz Ponce on 4/09/24. | |
// | |
import Foundation | |
/// A flexible container that stores values of any type, indexed by an enum-based key. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put this file in the Plugins folder | |
email::$services['mailgun'] = function($email) { | |
if(empty($email->options['key'])) throw new Error('Missing Mailgun API key'); | |
if(empty($email->options['domain'])) throw new Error('Missing Mailgun API domain'); | |
$url = 'https://api.mailgun.net/v3/' . $email->options['domain'] . '/messages'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
---------- | |
Rendertime | |
---------- | |
This pluging is disabled by default, use this in your config.php file of your | |
develoment enviroment and set the 'rendertime' property to true as follow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Same than `kirbytext()` but only allows the tags in `allowedTags` | |
* | |
* <code> | |
* | |
* $text = 'This is a html text with a **strong** and *em* text'; | |
* | |
* // Remove all tags except strong tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Runs a MySQL query. | |
* You can use any valid MySQL query here. | |
* This is also the fallback method if you | |
* can't use one of the provided shortcut methods | |
* from this class. | |
* | |
* @param string $sql The sql query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import flash.events.MouseEvent; | |
import flash.net.navigateToURL; | |
import flash.net.URLRequest; | |
boton1.addEventListener(MouseEvent.CLICK, onBoton1Click); | |
boton2.addEventListener(MouseEvent.CLICK, onBoton2Click); | |
function onBoton1Click (event:MouseEvent) { | |
navigateToURL(new URLRequest("http://apple.com"), "_blank"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.goto.media.*; | |
import flash.events.MouseEvent; | |
// Crea una instacia de ChromelessVideoPlayer | |
// Crea un reproductor de video sin piel | |
var player:ChromelessVideoPlayer = new ChromelessVideoPlayer(); | |
// Lo agrega al scenario | |
addChild(player); | |
// Se pone el tamaño inicial | |
player.setSize(480, 320); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gets the input | |
URL="$(cat)"; | |
# Encode the url using php | |
URL=$(php -r "echo urlencode('$URL');") | |
# Shorts the url using bitly api and copy to clipboard | |
curl -s "http://api.bitly.com/v3/shorten?login=LOGIN&apiKey=APY_KEY&longUrl=$URL&format=txt" | pbcopy | |
# Plays a sound when finishe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.goto.display.ImageView; | |
import com.goto.display.layout.HLayout; | |
import com.greensock.*; | |
import com.greensock.easing.*; | |
import flash.events.Event; | |
import flash.events.MouseEvent; | |
// Creo un layout horizotal para agregar las imágenes | |
var layout:HLayout = new HLayout(); | |
// Agrego una separación de 10 px para cada objeto del layout |
NewerOlder