Skip to content

Instantly share code, notes, and snippets.

@ctkjose
ctkjose / exc_spec_components_reasearch.md
Last active February 28, 2018 00:49
EXC: Components Frameworks Research

EXC: Researching Components

W3C Custom Element, Draft##

<flag-icon country="nl"></flag-icon>

class FlagIcon extends HTMLElement {
  constructor() {
 super();
@ctkjose
ctkjose / regex.md
Last active September 12, 2018 01:45
Reg EX

Selector

(([\.\#]{1}[a-zA-Z0-9_\-\:]+)((\[[a-zA-Z0-9_\-]+\])?|(\[[a-zA-Z0-9_\-]+[\^\*\$\~\|]?\=['"a-zA-Z0-9_\-]+\])?)?)

Double Quoted Value

("(?:[^"\\]|\\.)*")

Single Quote Value

@ctkjose
ctkjose / styling_forms.md
Last active October 14, 2017 19:51
Styling Forms

Styling Forms

Shadow/Glow

.style-1 input[type="text"] {
  padding: 10px;
  border: solid 1px #dcdcdc;
  transition: box-shadow 0.3s, border 0.3s;
}
.style-1 input[type="text"]:focus,
@ctkjose
ctkjose / jquerytips.md
Last active February 16, 2017 22:09
Debug JQUERY

List the event listeners added to an object using JQUERY:

$._data($('selector')[0],'events');
//A Basic Build Tool
function run(){
var p = binder.ko.projectGetPath();
if ( p.length <= 0) return;
var pd = binder.ko.pathJoin(p, "config.build.js");
//alert(pd);
var ok = binder.ko.pathExists(pd);
if(!ok){

Convert files to PDF

for line in $(ls SHCDRROP*); do cupsfilter -o landscape -o media=legal -o PageSize=legal -o fitplot=true $line > ~/COHORT_REPORTS/${line}.pdf 2> /dev/null; done
@ctkjose
ctkjose / webdev_tools.md
Last active June 26, 2021 04:37
Web Development Tools
@ctkjose
ctkjose / svn.md
Last active September 13, 2015 12:10
SVN on OS X

Using FileMerge as Diff Tool

Create a svndiff.sh file

mkdir ~/bin/
cp /dev/null ~/bin/svndiff.sh
chmod +x ~/bin/svndiff.sh
@ctkjose
ctkjose / jsc.md
Last active August 27, 2021 21:14
Enable Javascript CLI on OS-X

You can run the JavaScriptCore Framework from the CLI to run javascript code.

All we have to do is create an alias to access the jsc binary easily from the CLI.

sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc /bin/jsc

To see the CLI options available visit the WebKit wiki. http://trac.webkit.org/wiki/JSC

@ctkjose
ctkjose / gist:2759204141a4db5d12f1
Last active August 29, 2015 14:23
KOMODO9 Observers Listen and Send

https://github.com/Komodo/KomodoEdit/wiki/138-events-and-notifications

var obsSvc = Components.classes['@mozilla.org/observer-service;1'].getService(Components.interfaces.nsIObserverService);
var listener = {
    observe: function(subject, topic, data) {
        alert("received observer subject: " + subject);
    }
};
obsSvc.addObserver(listener, "application-activated", false);