Skip to content

Instantly share code, notes, and snippets.

View rishiv3's full-sized avatar
:octocat:
Eat πŸ˜‹ | Code πŸ‘¨β€πŸ’» | Sleep 😴 | Repeat ♾️ | Achieve πŸš€

Rishi Vishwakarma rishiv3

:octocat:
Eat πŸ˜‹ | Code πŸ‘¨β€πŸ’» | Sleep 😴 | Repeat ♾️ | Achieve πŸš€
View GitHub Profile
@rishiv3
rishiv3 / jshipster_and_and.js
Created March 14, 2017 12:59 — forked from berzniz/jshipster_and_and.js
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@rishiv3
rishiv3 / awesomebuilder.sh
Created February 15, 2017 15:04
Automate automation with this bash script. Build and package all joomla extensions you develop. It is using phing and a phing.xml found on another git repo. [email protected]:enav/phing-joomla-extension-builder.git. Prerequisite : follow enav's tutorial. Then just place awesomebuilder.sh script where your extensions source folder is. Not in your jo…
#!/bin/bash
cd "$1" && find . -maxdepth 3 -type f -name "build.xml" -print0 | xargs -0 -I{} \
bash -c 'current_dir=$(dirname "$1") ; echo "${current_dir}"; base=$(basename "${current_dir}"); echo "${base}"; \
phing -f "$1" -Dextension="${base}" build \
&& phing -f "$1" -Dextension="${base}"' -- {}
@rishiv3
rishiv3 / jquery.js
Last active August 29, 2015 14:12
jQuery
/*! jQuery v2.0.1 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-2.0.1.min.map
*/
(function(e,undefined){var t,n,r=typeof undefined,i=e.location,o=e.document,s=o.documentElement,a=e.jQuery,u=e.$,l={},c=[],f="2.0.1",p=c.concat,h=c.push,d=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=f.trim,x=function(e,n){return new x.fn.init(e,n,t)},b=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^-ms-/,N=/-([\da-z])/gi,E=function(e,t){return t.toUpperCase()},S=function(){o.removeEventListener("DOMContentLoaded",S,!1),e.removeEventListener("load",S,!1),x.ready()};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,t,n){var r,i;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:T.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(r[1