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 multiple scripts to head (nested when they depend on each other) | |
$.getScript("https://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js", function () { | |
$.getScript("https://datatables.net/release-datatables/extras/TableTools/media/js/TableTools.min.js",function(){ | |
alert("your resources are ready!") | |
}) | |
}) |
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
// | |
// Script for adding external CSS stylesheet to DXP | |
// | |
var myStylesLocation = 'http://www.ecwincentives.com/assets/css/bootstrap.min.css' | |
$('<link rel="stylesheet" type="text/css" href="'+myStylesLocation+'" >') | |
.appendTo("head"); | |
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
lsof -i tcp:3000 |
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
python -c " | |
import sys | |
sys.path = sys.path[1:] | |
import django | |
print(django.__path__)" |
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 django import http | |
from django.conf import settings | |
from django.core import urlresolvers | |
from django.shortcuts import get_object_or_404, redirect | |
from django.utils import simplejson | |
from django.utils.encoding import force_unicode | |
from yabl.authors.models import Author | |
class RESTResource(object): | |
""" |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
// code in here is executed once the entire page loads | |
$( window ).load(function() { ... }) | |
// the classic | |
$( document ).ready(function() { ... }); |
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
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
var percent = "50%"; | |
var result = parseFloat(percent) / 100.0; |
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
SELECT | |
CONCAT(TABLE_SCHEMA, '.', TABLE_NAME) AS 'Table', | |
UPDATE_TIME AS 'Updated' | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE DATE_SUB(NOW(), INTERVAL 5 Minute) < UPDATE_TIME AND TABLE_SCHEMA != 'INFORMATION_SCHEMA' AND TABLE_TYPE = 'BASE TABLE' |