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
(ns alpine | |
(:require [squint.compiler :as compiler] | |
[hiccup2.core :as h])) | |
(defn js | |
"Compiles the given form to javascript and returns a string. Be sure to add $squint as an Alpine.magic alias if you | |
want to use the squint core library in alpine. If you are using squint client-side you might use the following: | |
```clojure | |
(ns app |
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
;;; Multi Method | |
(defmethod slack/slash :info [{:keys [response-type]}] | |
{:response_type response-type | |
:text (str "TeamGantt for Slack v" (version/current))}) | |
(defmethod slack/slash :default [context] | |
(slack/slash (assoc context :command :help))) | |
;;; Syntactic sugar | |
(defmacro defslashcmd |
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
{ | |
"ansel_autostart": false, | |
"ansel_bg_color": "rgba(0, 0, 0, 1)", | |
"ansel_constrain_height": true, | |
"ansel_constrain_height_percent": "100", | |
"ansel_control_bar_button_color": "rgba(255, 255, 255, 1)", | |
"ansel_control_bar_button_shadow_color": "rgba(0, 0, 0, 0.5)", | |
"ansel_controls_bg_color": "", | |
"ansel_controls_padding_tb": "5px", | |
"ansel_controls_position": "bottom", |
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 | |
use Phinx\Config\Config as PhinxConfig; | |
class Config extends PhinxConfig | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getMigrationPath() |
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 | |
use Phinx\Db\Adapter\AdapterFactory; | |
use Phinx\Migration\Manager; | |
use Phinx\Migration\MigrationInterface; | |
use Symfony\Component\Console\Output\BufferedOutput; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class WordPressManager extends Manager implements MigratorInterface | |
{ |
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 | |
interface MigratorInterface | |
{ | |
/** | |
* Migrate the specified environment to a version. Migrates up if the version is null | |
* | |
* @param string $environment | |
* @param string $version | |
* @return mixed |
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 | |
/** | |
* Class PdoLikeObject - its like PDO, but not! | |
*/ | |
class PdoLikeObject | |
{ | |
/** | |
* Return the given value after it has been quoted by WordPress' esc_sql function | |
* |
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 | |
use Phinx\Db\Adapter\AdapterInterface; | |
use Phinx\Db\Adapter\MysqlAdapter; | |
use Phinx\Db\Table; | |
use Phinx\Db\Table\Column; | |
use Phinx\Db\Table\ForeignKey; | |
use Phinx\Db\Table\Index; | |
use Phinx\Migration\MigrationInterface; | |
use Symfony\Component\Console\Output\NullOutput; |
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
(def i (js/Image.)) | |
(def p (js/Promise. (fn [resolve] | |
(set! (.-onload i) #(resolve i)) | |
(set! (.-src i) "url.jpg")))) | |
(.then p (.-log js/console)) |
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
(watermark "some-resource.jpg" | |
(with-image "another-resource.jpg" lower-right) | |
(with-text "hello world!" my-draw) | |
(with-image "some-image.jpg" upper-left) | |
(append-to-thangs)) |
NewerOlder