Skip to content

Instantly share code, notes, and snippets.

James Hiscock Bockit

  • Sydney, Australia
Block or report user

Report or block Bockit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Bockit
Bockit / components.click-me.js
Created Feb 22, 2018
House of the Rising Sun
View components.click-me.js
import Ember from 'ember';
export default Ember.Component.extend({
});
View application.controller.js
import Ember from 'ember';
import primitiveBar from '../snippets/primitives/primitive-bar'
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
primitiveBar: primitiveBar
});
@Bockit
Bockit / components.my-book.js
Last active Aug 26, 2017
component-semantics-test
View components.my-book.js
import Ember from 'ember';
export default Ember.Component.extend({
willRender() {
console.log('rendered!')
},
click() {
this.get('select')()
},
@Bockit
Bockit / SassMeister-input.scss
Created Oct 21, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
.full-screen-nav {
font-size: 12px;
// .full-screen-nav-inner
&-inner {
font-size: 12px;
@Bockit
Bockit / component-child.jsx
Created Feb 28, 2015
Context exploration
View component-child.jsx
var React = require('react')
var Message = require('sub-component/message')
class Component extends React.Component {
getChildContext () {
return {
message: this.props.foo
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am bockit on github.
  • I am bockit (https://keybase.io/bockit) on keybase.
  • I have a public key whose fingerprint is 8BFC D654 DE74 F85D 23E4 A199 FFE9 5DAC BA99 CB0F

To claim this, I am signing this object:

@Bockit
Bockit / a.js
Created Oct 29, 2013
If two files have the same contents browserify is aliasing one file to the other file, which causes some function equality issues. This is my isolated example.
View a.js
module.exports = function() {
console.log('I am a function');
}
@Bockit
Bockit / Embed.html
Last active Dec 21, 2015
Embed code and postie.js It's important that the iframe comes before the script tags. jQuery must be on the page. If it isn't, you'll need to add it. If you change the id or name of the frame, keep both the same. Also, make sure to update the strings in the JavaScript. You can find the script 'postie.js' on this page as well. Also, CORS needs to…
View Embed.html
<iframe src="http://sasha-project.s3.amazonaws.com/afr-prod/projects/politics/index.html" frameBorder="0" id="elec-frame" name="elec-frame" style="display:block; width:100%"></iframe>
<script src="js/postie.js"></script>
<script>
var $frame = $('#elec-frame')
var postie = new Postie(window.frames['elec-frame'], $frame.attr('src'))
postie.on('change:height', function(height) { $frame.height(height) })
postie.on('change:hash', function(hash) { window.location.hash = hash })
postie.on('set:scroll', function(size) {
scrollTop = size.top - ($(window).height() - size.height) / 2
@Bockit
Bockit / gist:6118997
Created Jul 31, 2013
TSV to CSV, easy enough to make it go the other way too
View gist:6118997
csv.writer(file('data/asylum/asylumseekers_global.csv', 'w+'), delimiter=',').writerows(csv.reader(open("data/asylum/asylumseekers_global.tsv", 'Ur+'), delimiter='\t'))
@Bockit
Bockit / synclabels.py
Last active Dec 18, 2015
Simple script to sync labels to any repository. Usage: python synclabels.py owner/repo
View synclabels.py
import argparse
from getpass import getuser, getpass
from github3 import GitHub
user = raw_input('GitHub username: ')
password = ''
while not password:
password = getpass('Password for %s: ' % user)
You can’t perform that action at this time.