type | description | release type |
---|
View semantic-release.md
View .zshrc
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
# add ssh key to ssh-agent if it had not been added yet | |
ssh-add -l | grep -q "$HOME/.ssh/id_rsa" || ssh-add $HOME/.ssh/id_rsa |
View manual-typing-of-npm-module.d.ts
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
//real file is in: `typings/swagger-express-mw/index.d.ts` (relative to tsconfig.json) | |
import {Config, ConnectMiddleware} from "../swagger-node-runner" | |
/** | |
* Create a new instance of Connect specific SwaggerNodeRunner | |
*/ | |
export function create(config: Config, cb: {(err: Error | undefined, runner: ConnectMiddleware): void}): void |
View Dockerfile
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
FROM clifton/oracle-java8 | |
COPY /wso2is-5.1.0 /opt/wso2is | |
EXPOSE 9443 | |
CMD ["/opt/wso2is/bin/wso2server.sh"] |
View fix-flex-svg-panels.html
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
<html> | |
<body> | |
<svg width="100%" height="250" xmlns="http://www.w3.org/2000/svg"> | |
<foreignObject id="fixed-panel" width="100" height="100%"> | |
<svg width="100" xmlns="http://www.w3.org/2000/svg"> | |
<rect x="0" y="0" width="100" height="100%" fill="#fcc" rx="5" ry="5"/> | |
<text x="5%" y ="25" width="100" fill="#333">fixed width</text> | |
</svg> | |
</foreignObject> | |
<foreignObject id="flex-panel" width="100%" height="100%" style="padding-left:100px;"> |
View jquery.asyncOn
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
/* | |
* usage: exactly like like jQuery's `on` | |
* $("#xyz").on("click", function(){ ... }); => $("#xyz").asyncOn("click", function(){ ... }); | |
* $("#xyz").one("click", function(){ ... }); => $("#xyz").asyncOne("click", function(){ ... }); | |
*/ | |
$.fn.extend({ | |
asyncOn : function(types, selector, data, fn, one){ | |
/*based on https://github.com/jquery/jquery/blob/361a0d5150a1c57b1857611cde1b05bd0ef21a50/src/event.js*/ | |
var type, origFn; |
View cssToJSVariable.js
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
//transform CSS file to JS variable | |
grunt.registerTask("inlineCssToJs", function() { | |
var cssFile = "src/style.css"; | |
var cssFileDestination = "dist/style.js"; | |
var varName = "cssFileText"; | |
var cssContent = grunt.file.read(cssFile); | |
//clean CSS content | |
cssContent = cssContent.replace( /\/\*(?:(?!\*\/)[\s\S])*\*\//g, "").replace(/[\r\n\t]+/g, " ").replace(/[ ]{2,}/g, " ").replace(/\"/g,"\\\""); |
View ResourceDuration
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
window.performance.getEntriesByType("resource").sort(function(a, b) { | |
return b.duration - a.duration; | |
}).forEach(function(a){ | |
console.log(Math.floor(a.duration), a.name); | |
}); |
View third-party-calls.sql
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
/* WIP - not working yet */ | |
SELECT | |
NTH(10, num_requests) thenth, | |
NTH(25, num_requests) twenty_fifth, | |
NTH(50, num_requests) median, | |
NTH(75, num_requests) seventy_fifth, | |
NTH(90, num_requests) ninetieth | |
FROM( | |
SELECT COUNT(*) num_requests |
View mean.sublime-project
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": ".", | |
//"name" : "Mean Project Name", | |
"file_exclude_patterns": [ | |
"mean-dev.*" | |
,"local.*" | |
,"LICENSE" |