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 | |
| # add alias definitions on the go, | |
| # and reload .bash_aliases into your current shell | |
| function addalias() { | |
| read -p "alias name: " alias_name | |
| read -p "alias cmd: " alias_cmd | |
| cmd_str="alias $alias_name=\"$alias_cmd\"" | |
| the_rest=" >> ~/.bash_aliases && . ~/.bash_aliases" |
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
| # plugins/wordcount/plugin.rb | |
| after_initialize do | |
| add_to_serializer(:topic_list_item, :word_count_of_replies) do | |
| object.posts.where.not(user: object.user).sum(:word_count) | |
| end | |
| end | |
| # topic-posts-column.hbr | |
| <{{view.tagName}} class='num posts-map posts {{view.likesHeat}} topic-list-data' title='{{view.title}}'> | |
| <button class="btn-link posts-map badge-posts {{view.likesHeat}}" aria-label="{{view.title}}"> |
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
| apps='ps cexmo pid,user,comm | gvg -E '\''(nginx|puma|redis|postgresq|apache|bundler|ruby|/gem|sidekiq)'\' | |
| #!/bin/zsh | |
| function ww() { | |
| wcmd=$1 | |
| echo $'\e[1;34m'$(which $wcmd)$'\n\e[0m\e[0;34m'$(whereis $wcmd)$'\e[0m'; | |
| } | |
| function addalias() { | |
| read 'tmpAlias?shortcut: ' |
OlderNewer