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
| import Ember from 'ember'; | |
| export default class MyComponent extends Ember.Component { | |
| constructor() { | |
| super(); | |
| // Empty string causes runtime error | |
| // "Assertion Failed: You cannot use `elementId` on a tag-less component" | |
| // Comment this line to fix | |
| this.tagName = ''; |
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
| <h1>FOOD CATEGORIES</h1> | |
| <div class="Category"> | |
| <div class="Category-header" id="category-1-header"> | |
| <h1>Tapas</h1> | |
| </div> | |
| <div class="Category-body" id="category-1-body"> | |
| <ul class="is-red"> | |
| <li>Olives</li> | |
| <li>Pickles</li> |
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
| sysbench 0.4.12: multi-threaded system evaluation benchmark | |
| Running the test with following options: | |
| Number of threads: 4 | |
| Doing CPU performance benchmark | |
| Threads started! | |
| Done. |
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 | |
| IFS=$'\n'; | |
| output="$(echo "`for author in $(git log | grep "Author:" | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}' | sort | uniq); do | |
| echo "${author}:|$(git log --pretty=oneline --author=${author} | wc -l | xargs echo) commits"; | |
| done`" | sort -n -k2 -r -t '|' | column -t -s '|')"; | |
| echo "${output}"; | |
| echo "$(git log --pretty=oneline | wc -l) commits total"; |
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
| # Usage: git-prompt (when in a git repo) | |
| # Print the output of `git status` then prompt the user for whether | |
| # they wish to `git push` | |
| function git-prompt() { | |
| git log "origin/$(git rev-parse --abbrev-ref HEAD)"..HEAD | |
| echo '------------------------------------------'; | |
| git status --untracked-files no; | |
| echo '------------------------------------------'; | |
| while true; do |
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
| # Add to your ~/.bash_profile | |
| # Usage: npm-exec (command) [...args] | |
| # Execute a command located in an npm bin directory, without | |
| # having to manually path to it | |
| function npm-exec() { | |
| bin="${1}"; | |
| shift | |
| args="$*" | |
| "$(npm bin)/${bin}" ${args}; |
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
| # Usage: ls-count (directory=.) (depth=1) | |
| # Perform a recursive find in the specified folder, and display | |
| # a summary of the total number of files in each subfolder | |
| # | |
| # If `directory` is specified, perform search in that directory. Defaults to '.' | |
| # If `depth`is specified, output analysis down to `depth` levels from root. Defaults to 1 | |
| # Example usage: | |
| # ls-count | |
| # ls-count ~/Documents | |
| # ls-count ~/Documents/Projects 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
| # @NOTE You will need to change column width of User name (currently 20) to match the length of the names | |
| # of the people on your team!! | |
| # Register alias on git: | |
| git config --global alias.patch-notes 'log --pretty="%h %<(20)%an%<(22)%ad %s" --date="format:%m/%d %a %T%t"' | |
| # Usage: | |
| # git patch-notes | |
| # git patch-notes release/2019-05..HEAD | |
| # etc. |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <link rel="stylesheet" href="./style.css"> |
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
| # Paste into your .bashrc / .bash_profile / .zshrc etc. | |
| alias ls-containers="docker ps --format 'table {{.ID}}\t{{.Names}}\t{{.RunningFor}}\t{{.Status}}'" |