Skip to content

Instantly share code, notes, and snippets.

Dinesh Copoosamy dineshcooper

View GitHub Profile
dineshcooper / .jshintrc
Last active Jun 8, 2018
My jshint config for angular apps
View .jshintrc
"eqeqeq": true,
"angular": true
"quotmark": "single",
"strict": true,
dineshcooper / gist:5789630
Created Jun 15, 2013
Have your drupal module's custom tables schema automatically updated - useful if you developing and making changes to the table. You will need to change the strpos line to look for whatever naming convention you used for your module's tables. (p.s. don't know if this is bad form in any way - but fuck it saves a lot of time)
View gist:5789630
function MYMODULENAME_schema(){
$schema = array();
$inspect = schema_dbobject()->inspect();
foreach ($inspect as $key => $value) {
if (strpos($key,'MYMODULENAME_') !== false) {
$schema[$key] = $value;
dineshcooper / gist:5340284
Created Apr 8, 2013
passing along a cookie with restler - NB: Cookie key in headers must not be quoted
View gist:5340284
var cookie = key + '=' + val;'',{
data: {
headers: {
'Host': '',
Cookie : cookie
dineshcooper / canvas.css
Created Mar 20, 2012
Dynamically load canvas app specific JS and CSS if page is being viewed within Facebook Canvas
View canvas.css
/* Put any canvas specific css here - i just put a border around the canvas to test that it's working */
border: 2px solid #666;
dineshcooper / responsive_likebox.html
Created Mar 19, 2012
Responsive Facebook Like Box
View responsive_likebox.html
<!DOCTYPE html>
<script src="//" type="text/javascript"></script>
<div id="container" style="width:100%;">
<div class="fb-like-box" data-href="" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
You can’t perform that action at this time.