- README needs to tell what to edit before we connect to DB
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
| (ns xxx.components.progress-bar | |
| (:require [re-frame.core :refer [subscribe dispatch]])) | |
| (def COLOR "rgb(178, 34, 34)") | |
| (def VISIBLE-STYLE {:height 2 :opacity 1 :color COLOR :background-color COLOR }) | |
| (def PRGORESS-BAR-CONTAINER-STYLE {:position "fixed" | |
| :margin 0 | |
| :padding 0 | |
| :top 0 | |
| :left 0 |
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
| #/bin/bash | |
| echo 'alias g=git' >> ~/.zshrc | |
| g config --global alias.ca 'commit --amend --reuse-message=HEAD' | |
| g config --global alias.ci commit | |
| g config --global alias.cp cherry-pick | |
| g config --global alias.cl clone | |
| g config --global alias.co checkout | |
| g config --global alias.f fetch | |
| g config --global alias.b branch | |
| g config --global alias.s status |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
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
| (ns rdp.core) | |
| ; Ramer-Douglas-Peucker algorithm based on http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm | |
| (defn- dist [point start end] | |
| (let [num (- (* (- (first end) (first start)) | |
| (- (last start) (last point))) | |
| (* (- (first start) (first point)) | |
| (- (last end) (last start)))) |
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
| var result = | |
| Array.prototype.slice.call(document.querySelectorAll('.semester .data')). | |
| map(function(t) { | |
| var td = t.querySelectorAll('td'); | |
| return[t.querySelector('[data-title="nazwaKursu"]').innerText, | |
| parseFloat(t.querySelector('[title="ocena"]').innerText, 10), | |
| parseFloat(td[td.length -1 ].innerText, 10) | |
| ]; | |
| }).reduce(function(r, t) { | |
| return [r[0] + (t[1] * t[2]), r[1] + t[2]] |
- install xcape
- run:
xcape -e 'Shift_L=Escape;Control_L=Control_L|G;Caps_Lock=Control_L|G'
Holding SHIFT/CTRL/CAPS keys will work as usual, simple press will work as ESC(Shift)/CTRL+G(ctrl/caps)
def self.fetch_by_tracking_code(tracking_code)
Domain.where(tracking_code: tracking_code).take
endgives: (no default scopes)
"SELECT "domains".* FROM "domains" WHERE
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
| 'use strict'; | |
| import React, { | |
| AppRegistry, | |
| Component, | |
| StyleSheet, | |
| Text, | |
| View, | |
| ScrollView, | |
| TouchableOpacity | |
| } from 'react-native'; |
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
| defmodule Config do | |
| defmacro __using__(_) do | |
| quote do | |
| import unquote(__MODULE__), only: :macros | |
| end | |
| end | |
| defmacro cfg(key, type \\ :string) do | |
| quote do | |
| defp unquote(key)() do |