This file contains hidden or 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 | |
| /**Display Bitbucket wiki pages with SimpleWiki parser. | |
| * A rough script for refactoring. | |
| * | |
| * @copyright Copyright Nick Freear, 29 April 2011. | |
| * @uses http://simplewiki.org/language#patterns | |
| */ | |
| ini_set('display_errors', 1); | |
| header('Content-Type: text/html; charset=utf-8'); |
This file contains hidden or 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
| @charset "utf-8"; | |
| html, body, body div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video | |
| { margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; } | |
| article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section | |
| { display: block } | |
| blockquote, q { quotes: none } |
This file contains hidden or 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 | |
| /** | |
| * JApi, short of JSON API, is an action handler for Yii. | |
| * | |
| * JApi maps requests in the form ?r=controller/japu&action=method to controller->japiMethod. Then, anything returned from | |
| * japiMethod is encoded in JSON and sent to the client. Parameters in the function are mapped to _GET varibles. JApi | |
| * follows the requirments of the parameters, such as optional and required. | |
| * | |
| * EXAMPLE: | |
| in ExampleController.php |
This file contains hidden or 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
| [alias] | |
| fixlock = ! git reset HEAD -- composer.lock && git co -- composer.lock && composer update --no-scripts && git add composer.lock |
This file contains hidden or 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
| @mixin linksColors-lvhaf($link, $visited, $hover, $active, $focus) { | |
| a { transition:.2s; padding:1%; margin:-1%; text-decoration:underline; | |
| & { color:$link; } | |
| &:visited { color:$visited; } | |
| &:hover { color:$hover; text-decoration:none; } | |
| &:active { color:$active; outline:#ccc 1px dotted; } | |
| &:focus { color:$focus; } | |
| } | |
| } |
This file contains hidden or 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 | |
| namespace rmrevin\yii\pug; | |
| use Pug\Pug; | |
| use Yii; | |
| use yii\base\View; | |
| use yii\helpers\FileHelper; | |
| /** |
This file contains hidden or 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
| # This gist is transcribed from a talk by Sean Zicari | |
| # Talk: Use Curses, don't swear https://www.youtube.com/watch?v=eN1eZtjLEnU | |
| # | |
| # I haven't written the function which he used to fetch quotes from the web | |
| # This only presents the barebones structure of his application | |
| # | |
| # If debugging a curses application messes up your terminal, type `tset` to reset terminal | |
| import curses |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Allows you to test the create-project process using your local | |
| # checked-out copy of the skeleton as the source. You MUST commit the | |
| # changes you want to test to a git branch! You MUST name that branch | |
| # as the first argument and the destination path to set up the fresh | |
| # copy into as the second. | |
| # | |
| # Usage: | |
| # - Place this script in your package's root directory and make it executable. | |
| # - Set the PACKAGE_NAME variable below to match your composer.json's `name`. |
This file contains hidden or 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
| # Ben's Magical Perceptron | |
| def dot_product(a, b): | |
| return sum([a[i]*b[i] for i in range(len(a))]) | |
| def decision( x, w, theta ): | |
| return (dot_product(x, w) > theta) | |
This file contains hidden or 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
| -- ~/.config/nvim/lua/plugins/feline/colors.lua | |
| -- One-dark colors | |
| local _M = { | |
| bg = '#2c323c', | |
| fg = none, | |
| yellow = '#e5c07b', | |
| cyan = '#8abeb7', | |
| darkblue = '#528bff', | |
| green = '#98c379', |
OlderNewer