- Ctrl+A or Home: Go to the beginning of the line.
- Ctrl+E or End: Go to the end of the line.
Zsh Bindings:
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
- Alt+F: Go right (forward) one word.
- Alt+B: Go left (back) one word.
Automatically limit your models to the current team
So you're using spark, and you have teams enabled. You start creating models and want to have them be team specific. Instead of writing, Model::where('team_id', auth()->user()->currentTeam->id)->get();
use this trait to add that behind the scenes so that every time you call on your model, it's assumed that you mean for the current team.
This assumes that the model has a team_id
, while it adds a scope of where team_id = currentTeam->id
.
Note: Implicit Route Model Binding in 5.2, auth session doesn't exist at the point of this trait causing issue. fixed in 5.3
Makes 5 users each with 1 team that has 5 members
Add a team factory to database/factories/ModelFactory.php
$factory->define(App\Team::class, function (Faker\Generator $faker) {
return [
'name' => $faker->sentence,
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
new sap.m.Text({ | |
text: { | |
parts: [ | |
{path: "Width"}, | |
{path: "Depth"}, | |
{path: "Height"}, | |
{path: "DimUnit"} | |
], | |
formatter: function(width, depth, height, dimUnit){ | |
return width + " x " + depth + " x " + height + " " + dimUnit; |
// Create Base64 Object | |
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
Located in alphabetical order (not prefer)
C
ab
), also designed as a more modern replacement, written in C
golang
)<? | |
/*** | |
* class apiCCB | |
* | |
* @author Jeremiah D. McKinstry <[email protected]> | |
* @date Wednesday, August 14, 2013 | |
* @version 1.0.0 | |
* @see https://cdn6.ccbchurch.com/2/documents/pwt_implement.pdf | |
* | |
* @copyright This class is free: you can redistribute it and/or modify |
#!/bin/bash | |
echo "1. Download the main file from the eclipse update site" | |
wget --no-check-certificate https://tools.hana.ondemand.com/juno/content.jar | |
echo "2. Unzip the content.jar to content.xml (and delete content.jar)" | |
unzip content.jar | |
rm content.jar | |
echo "3. Generate urls for the components to fetch com.sap.ui5" |