Skip to content

Instantly share code, notes, and snippets.

🦉

Julia Krüger Realtin

🦉
Block or report user

Report or block Realtin

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
@Realtin
Realtin / diaspora_setup.md
Last active Aug 29, 2015
usefull snippets for working on diaspora via vagrant
View diaspora_setup.md

How to setup Diaspora Development Environment with Vagrant

Initialize project

git clone https://github.com/joebew42/diaspora-replica.git
cd diaspora-replica/
git submodule update --init

Cloning your git repository in src/ directory

View gist:6ae65d21b6ef9048b2c0
[2015-07-08T09:14:09] DEBUG PID-5098 TID-4987280 Rails:
[2015-07-08T09:14:09] INFO PID-5098 TID-4987280 Rails: Started GET "/" for 192.168.11.1 at 2015-07-08 09:14:09 +0000
[2015-07-08T09:14:11] INFO PID-5098 TID-4987280 ActionController::Base: Processing by HomeController#show as HTML
Rendered home/default.haml within layouts/application (75.3ms)
Rendered layouts/_open_graph.haml (15.9ms)
[2015-07-08T09:14:16] INFO PID-5098 TID-4987280 ActionController::Base: Completed 200 OK in 5235ms (Views: 5196.2ms | ActiveRecord: 0.0ms)
Rendered errors/error_404.haml within layouts/error_page (8.9ms)
Rendered errors/error_422.haml within layouts/error_page (1.5ms)
Rendered errors/error_500.haml within layouts/error_page (17.7ms)
Rendered errors/error_404.haml within layouts/error_page (9.7ms)
View gist:bc21c95e0cfcbf23a886
vagrant@development:~/diaspora_src$ bin/rspec spec/models/photo_spec.rb:162
=> Building fixtures
=> Built aspect_memberships.yml, aspects.yml, contacts.yml, people.yml, profiles.yml, and users.yml
Run options:
include {:locations=>{"./spec/models/photo_spec.rb"=>[162]}}
exclude {:performance=>true}
Randomized with seed 59971
1) Photo with a saved photo containing EXIF data should not contain EXIF data if user prefer
View LightTable
;; Your file has been converted to the new flat format.
;; Conversion does not preserve comments or indentation.
;; File is backed up at /Users/Brunhilde/Library/Application Support/LightTable/User/user.behaviors.bak
[
[:app :lt.objs.settings/pair-keymap-diffs]
[:editor :lt.objs.editor/no-wrap]
[:editor :lt.objs.editor/line-numbers]
View pascal-triangle.clj
;; take a vector v and index i
;; index n + index n-1
(defn add [v i]
(+
;; 0 is default when return value is nil
(get v i 0)
(get v (- i 1) 0)))
; calculates the next row of a given row
(defn new-row [v]
View zshrc
#!/usr/bin/env zsh
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Path to z
. /Users/Brunhilde/Documents/z/z.sh
autoload -U colors && colors
View jasmine.org

Testing React Compnents with Jasmine

Jasmine, a BDD Testing Framework for Javascript

BDD ?

describe('Customer', () => {              // Test Suite
  describe('Creation', () => {            // grouping related specs
    it('has a fitting title', () => {     // the actual spec!
      expect(comp.refs.title.innerText).toBe('New Customer');
    });
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View example.js
// Version 1.0.0
function changeCase (theString) {
return theString.toUpperCase()
}
// Version 1.1.0 (Feature)
function changeCase (theString, allowLowerCasing = false) {
if (allowLowerCasing && theString.toUpperCase() === theString) {
You can’t perform that action at this time.