Skip to content

Instantly share code, notes, and snippets.

View jhchabran's full-sized avatar
🧀

Jean-Hadrien Chabran jhchabran

🧀
View GitHub Profile
@jhchabran
jhchabran / keybindings.cson
Created May 20, 2014 06:21
Current Atom keybindings
'.vim-mode:not(.insert-mode)':
'space space': 'command-palette:toggle'
'space w': 'core:save'
'space q': 'core:close'
'space f': 'fuzzy-finder:toggle-file-finder'
'space c': 'git-plus:commit'
'space a': 'git-plus:add'
@jhchabran
jhchabran / lt-todo.md
Last active December 31, 2015 06:09
Stuff I'd like to have in Lighttable
@jhchabran
jhchabran / Groov.md
Last active December 24, 2015 23:39

Groov's Invoker's mentoring session

invoker

Introduction

Hello, I'm Groov, bla bla bla :D

What do you need before the session

  • Send me a replay where you feel you've been really useful to your team
  • Send me a replay where you feel you were useless
# Install the message listener
chrome.extension.onRequest.addListener (request, sender, sendResponse)->
# Select the right response given the message
switch request.message
# Grab all tabs
when "getTabs"
chrome.windows.getCurrent (window)->
chrome.tabs.getAllInWindow window.id, (tabs)->
# We've collected all tabs, let's send them back
sendResponse(tabs:tabs)
class Application
constructor: ->
# Inject our html into the view
@injectView()
# Install a listener for our input
@element().find('input').keyup (event)=>
@onInput(event)
# Spawn a view that handle results display
tab =
id : 43
windowId : 4
url: "http://google.com"
title: "Google"
tabswitcher # Repository root
/build # Generated Javascripts end there
/libs # Dependencies
/src # Our code
/background.html # Extension's 'main view'
/manifest.json # Extension settings
/Cakefile # Starts build task
task 'build', 'Build extension code into build/', ->
if_coffee ->
ps = spawn("coffee", ["--output", JAVASCRIPTS_PATH,"-- compile",COFFEESCRIPTS_PATH])
ps.stdout.on('data', log)
ps.stderr.on('data', log)
ps.on 'exit', (code)->
if code != 0
console.log 'failed'
tabswitcher # Repository root
/background.html # Extension's 'main view'
/manifest.json # Extension settings