Skip to content

Instantly share code, notes, and snippets.

@dogoku
dogoku / gherkin.md
Last active July 18, 2023 06:25
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
dogoku / A README.md
Last active December 29, 2022 02:58 — forked from tiffon/Find Results.hidden-tmLanguage
Search result syntax highlighting for Sublime Text

#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

@dogoku
dogoku / stencil-helper.js
Last active August 6, 2022 23:20
Helper functions that simplify compiling and running stencil source code in the browser
function loadStencilCompiler(doc = document) {
const s = doc.createElement('script');
// loading from jsdelivr because skypack is not converting this file correctly
s.src = 'https://cdn.jsdelivr.net/npm/@stencil/core@latest/compiler/stencil.min.js';
return new Promise((resolve, reject) => {
s.onload = () => resolve(window.stencil.transpile);
s.onerror = reject;
doc.body.appendChild(s);
});
}
@dogoku
dogoku / .gitconfig
Created September 3, 2013 10:04 — forked from pksunkara/config
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
#!/usr/bin/env coffee
# Call the program with: coffee phantom.coffee http://url.to/screengrab
phantom = require 'phantom' # npm install phantom
child_process = require 'child_process'
url = process.argv[2]
createScreenshot = (page, filename) ->
@dogoku
dogoku / index.html
Created July 5, 2013 10:02
A CodePen by suffick. Tear-able Cloth - Javascript cloth simulation.
<canvas id = "c" > </canvas>
<a target="_blank" href="http://codepen.io/stuffit/pen/fhjvk" id="p">Like playing with physics? Click here!</a>
<div id="info">
<div id="top">
<a target="_blank" id="site" href="http://lonely-pixel.com">my website</a>
<a id="close" href="">close</a>
</div>
<p>
@dogoku
dogoku / Prism.min.js
Created October 6, 2015 11:56
Minified file breaking sublime-babel package
/**
* Prism: Lightweight, robust, elegant syntax highlighting
* MIT license http://www.opensource.org/licenses/mit-license.php/
* @author Lea Verou http://lea.verou.me
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[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){n.call(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[