Skip to content

Instantly share code, notes, and snippets.

View gist:820b053d3501e1a7b489
1.0
All Types
- is(type)
- ensures that type matches
- string, object, array, function, Boolean
- collection types 'string[]'
- takes literals as well ({}, [])
- returns value
Objects, Arrays
View commit-msg
#!/bin/bash
LINE=$(head -n 1 $1);
LENGTH=${#LINE};
if [[ $LENGTH -gt 50 ]]; then {
echo "Commit Aborted!";
echo -e "Message is \e[31m$LENGTH characters long\e[0m, must be <= 50."
exit 1;
} fi;
@brycepj
brycepj / bypasser
Created Jan 28, 2015
Bypass strongstart survey
View bypasser
angular.element(document.querySelector('[ng-app]'))
.injector()
.get('munDocIO')
.mkDocSaver('ike_presurvey_chore')({data: []})
.then(location.reload.bind(location));
@brycepj
brycepj / scope
Created Jan 19, 2015
scope problemz
View scope
When I inspect the scope `in_labor` equals true. So why is it making the ng-if evaluate to false?
(When I remove in_labor it evaluates to true and displays the .panel)
```
.panel.labor-alert(ng-controller='LaborAlertCtrl' ng-if='apps.KEARTH && laborAlert.show && in_labor')
.panel-body
p
strong In labor: {{ in_labor }}
p
@brycepj
brycepj / tvpint
Created Jan 16, 2015
tv.Int error
View tvpint
Error: No handler defined for <tv.Int>
at DynamicDispatchGraph.extend.mixin.call (http://localhost:8008/kerbin/common-mbundle.32badbc1.js:41713:15)
at GraphDispatcher.extend.call (http://localhost:8008/kerbin/common-mbundle.32badbc1.js:41318:27)
at http://localhost:8008/kerbin/common-mbundle.32badbc1.js:43337:29
at Array.forEach (native)
at import_polymorph (http://localhost:8008/kerbin/common-mbundle.32badbc1.js:43335:6)
at Dispatcher.BaseDispatcher.call (http://localhost:8008/kerbin/common-mbundle.32badbc1.js:41543:15)
at http://localhost:8008/kerbin/common-mbundle.32badbc1.js:43317:70
at Array.forEach (native)
at import_custom (http://localhost:8008/kerbin/common-mbundle.32badbc1.js:43317:16)
@brycepj
brycepj / bug
Created Jan 12, 2015
buggy mcbug
View bug
22:38:59 sterling | Traceback (most recent call last): [51/1863]
22:38:59 sterling | File "/home/stageguy/sterling/nixd/opt/python3.4/lib/python3.4/site-packages/gunicorn/workers/sync.py", line 93, in han
dle
22:38:59 sterling | self.handle_request(listener, req, client, addr)
22:38:59 sterling | File "/home/stageguy/sterling/nixd/opt/python3.4/lib/python3.4/site-packages/gunicorn/workers/sync.py", line 134, in ha
ndle_request
22:38:59 sterling | respiter = self.wsgi(environ, resp.start_response)
22:38:59 sterling | File "/home/stageguy/sterling/nixd/opt/python3.4/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__
22:38:59 sterling | return self.wsgi_app(environ, start_response)
22:38:59 sterling | File "/home/stageguy/sterling/nixd/opt/python3.4/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app
@brycepj
brycepj / wifi-spoofer
Last active Aug 29, 2015
Free Airport Wifi
View wifi-spoofer
#!/bin/bash
# get current MAC address
current_grep_MAC=$(ifconfig en1 | grep ether)
for i in $(echo $current_grep_MAC)
do
len="${#i}"
if [ $len -eq "17" ]; then
current_MAC="$i"
@brycepj
brycepj / shapes
Created Oct 23, 2014
current shapes mixins
View shapes
// create something to combine btn and btn-link
.left-triangle(@color, @length, @base) {
display: block;
content: " ";
position: absolute;
border-style: solid;
border-width: @base/2 @length @base/2 0;
border-color: transparent @color transparent transparent;
@brycepj
brycepj / Responsive Forms Screen
Last active Aug 29, 2015
Any issues with this?
View Responsive Forms Screen
I'm working on making #sidebar and .main-content-wrap (Forms) play
nice on smaller screens, using some Bootstrap-3-like conventions in
ehr.less, with minimal adjustments to current markup (see below).
The only thing I would need to adjust in the markup is switching
the position of #sidebar and .main-content-wrap (making #sidebar first).
I've tested in Chrome Dev Tools, and it seems to work flawlessly.
But I didn't want to mess with templates/clientforms/display.html
without talking to you first. Thoughts?
You can’t perform that action at this time.