Skip to content

Instantly share code, notes, and snippets.

dogoku / stencil-helper.js
Last active Aug 6, 2022
Helper functions that simplify compiling and running stencil source code in the browser
View stencil-helper.js
function loadStencilCompiler(doc = document) {
const s = doc.createElement('script');
// loading from jsdelivr because skypack is not converting this file correctly
s.src = '';
return new Promise((resolve, reject) => {
s.onload = () => resolve(window.stencil.transpile);
s.onerror = reject;
dogoku /
Last active Jul 25, 2022
Gherkin syntax

Writing Features - Gherkin Language

Behat is a tool to test the behavior of your application, described in special language called Gherkin. Gherkin is a Business Readable, Domain Specific Language created especially for behavior descriptions. It gives you the ability to remove logic details from behavior tests.

Gherkin serves two purposes: serving as your project's documentation and automated tests. Behat also has a bonus feature: it talks back to you using real, human language telling you what code you should write.

If you're still new to Behat, jump into the /quick_intro first, then return here to learn more about Gherkin.

Gherkin Syntax

dogoku / Prism.min.js
Created Oct 6, 2015
Minified file breaking sublime-babel package
View Prism.min.js
* Prism: Lightweight, robust, elegant syntax highlighting
* MIT license
* @author Lea Verou
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[
dogoku / A
Last active Jul 15, 2022 — forked from tiffon/Find Results.hidden-tmLanguage
Search result syntax highlighting for Sublime Text
View A

#ST2/3 Search result syntax highlighting

##Introduction and disclaimer

This is gist contains an edited Find Results.hidden-tmLanguage which adds syntax highlighting to your ST search results. As far as I know, there is no plugin that does this and for that reason it needs to be done via config.

DISCLAIMER: Use this HACK at your risk and backup the original files you are about to mess with.

##Usage Guide for Sublime Text 2

View .gitconfig
name = Pavan Kumar Sunkara
email =
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
smtpencryption = tls
smtpserver =
#!/usr/bin/env coffee
# Call the program with: coffee
phantom = require 'phantom' # npm install phantom
child_process = require 'child_process'
url = process.argv[2]
createScreenshot = (page, filename) ->
dogoku / index.html
Created Jul 5, 2013
A CodePen by suffick. Tear-able Cloth - Javascript cloth simulation.
View index.html
<canvas id = "c" > </canvas>
<a target="_blank" href="" id="p">Like playing with physics? Click here!</a>
<div id="info">
<div id="top">
<a target="_blank" id="site" href="">my website</a>
<a id="close" href="">close</a>