Skip to content

Instantly share code, notes, and snippets.

Avatar

Minhaj minhajkk

View GitHub Profile
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@minhajkk
minhajkk / page-scroll-script
Last active Dec 18, 2015
To scroll the page up to given element.
View page-scroll-script
$('html, body').animate({
scrollTop: $('#elementId').offset().top
});
@minhajkk
minhajkk / remove-non-serializable-objs-from-flow
Last active Dec 18, 2015
Method to remove non serialized objects from flow.
View remove-non-serializable-objs-from-flow
/**
* To remove non serialized objects from flow.
*
* @param flow
* @return
*/
private removeNonSerializableFromContext(def flow){
def remove = []
flow.persistenceContext.getPersistenceContext().getEntitiesByKey().values().each { entity ->
if(!entity instanceof Serializable){
@minhajkk
minhajkk / CompileSources.groovy
Created Jul 8, 2012
gant script for generating stubs from a whizdul file...
View CompileSources.groovy
import grails.util.GrailsUtil
includeTargets << grailsScript("Init")
target(main: "The description of the script goes here!") {
File whizdul = new File("${basedir}/grails-app/conf/enterprise.wsdl")
if (whizdul.exists()) {
String[] attrs = [
"${basedir}/grails-app/conf/enterprise.wsdl",