Skip to content

Instantly share code, notes, and snippets.

View rikukissa's full-sized avatar
🍔

Riku Rouvila rikukissa

🍔
View GitHub Profile
@rikukissa
rikukissa / Default (OSX).sublime-keymap
Created July 21, 2014 21:16
vamma space vauhdissa
[
{
"keys": ["alt+space"],
"command": "insert_snippet",
"args": {
"contents": " "
}
}
]
.btn
border 0
margin 0
cursor pointer
padding 1em 2em
background #478BEF
color #fff
font inherit
font-size 1.3em
font-weight 100
"browserify-shim": {
"restangular": {
"depends": [
"lodash:_"
]
},
"angular-moment": {
"depends": [
"moment:moment"
]
bundles =
app:
src: './client/js/main.coffee'
dest: './public/js/'
filename: 'main.js'
admin:
src: './client/js/admin.coffee'
dest: './public/js/'
filename: 'admin.js'
handleError = (err) ->
gutil.log err
gutil.beep()
this.emit 'end'
throw err if production
$.get('foobar.php').then(function() {
console.log('success');
}, function() {
console.log('fail');
});
.config(function(MessageFormatterProvider) {
// Initial formatters and example usage
// Removes all tags
MessageFormatterProvider.addFormatter(function(message) {
return message.replace(/<[^>]+>/gm, '');
});
// Replace line breaks with br - tag
$rootScope
.$on '$stateChangeStart', (event, toState, toParams) ->
if not Auth.isAuthed() and toState.name isnt Auth.loginState and not (toState.name in Auth.ignoredRoutes)
event.preventDefault()
Auth.checkAuth().then ->
$state.transitionTo toState, toParams
, ->
$state.transitionTo Auth.loginState, toParams
@rikukissa
rikukissa / .gitignore
Last active July 21, 2023 13:47
Simple gulp + browserify + livereload example
node_modules
@rikukissa
rikukissa / .gitignore
Last active April 8, 2026 18:18
Darker theme for Shout. Has a bit more eye-friendly color scheme and hides some IMO unnecessary features such as "Leave" and "Submit" buttons.
.DS_Store