This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name fuck rats | |
| // @namespace fuck rats | |
| // @version 0.1 | |
| // @description fuck rats | |
| // @author fuck rats | |
| // @match *://*/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( $validation->passes() ) | |
| { | |
| $user = new User; | |
| $user->first_name = $user_data['first_name']; | |
| $user->surname= $user_data['surname']; | |
| $user->email = $user_data['email']; | |
| $user->password = Hash::make( $user_data['password'] ); | |
| $user->active = 1; | |
| $user->save(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define [ "jquery", "underscore", "backbone", "vm", "text!templates/plan/sidebar.html", "handlebars", "views/plan/plan", "views/plan/tasks" ], ($, _, Backbone, Vm, sidebarTemplate, Handlebars, planView, taskView) -> | |
| class SidebarView extends Backbone.View | |
| initialize: (options) => | |
| @options = options | |
| @plan_model = options.plan_model | |
| @planView = new planView( options ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $( '#signup' ).live( 'click', function( e ){ | |
| e.preventDefault(); | |
| planzai.showLoadingSign(); | |
| var form = $( 'form' ); | |
| $.post( form.attr( 'action' ), form.serialize(), function( data ){ | |
| if( typeof data == 'object' ) | |
| { | |
| window.location = data.redirect; | |
| } | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROMPT=' | |
| %{$fg_bold[red]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)$(git_prompt_status) | |
| $(virtualenv_info)-> ' | |
| ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[yellow]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[green]%}+$fg[red]%}-$reset_color%}$fg[white]" | |
| ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}•%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔%{$reset_color%}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.each( weeks, ( i, week ) => | |
| console.log i | |
| for_week = 'w/c ' + new Date.parse( i ).toString( 'dddd d MMMM' ) | |
| @$el.prepend @template {for: i, for_tidy: for_week, tasks_due: week.length} | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.each( weeks, ( i, week ) => | |
| for_week = 'w/c ' + new Date.parse( i ).toString( 'dddd d MMMM' ) | |
| @$el.prepend @template {for: i, for_tidy: for_week, tasks_due: week.length} | |
| $.each( week, ( index, task ) => | |
| task_data = task | |
| task_data.assignment_count = task.assignments.length | |
| $( '#for_' + i ).append @task_template task_data | |
| ) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.each( weeks, ( i, week ) => | |
| for_week = 'w/c ' + new Date.parse( i ).toString( 'dddd d MMMM' ) | |
| @$el.prepend @template {for: i, for_tidy: for_week, tasks_due: week.length} | |
| $.each( week, ( index, task ) => | |
| task_data = task | |
| task_data.assignment_count = task.assignments.length | |
| $( '#for_' + i ).append @task_template task_data | |
| ) | |
| ) |
NewerOlder