sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot
| 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: ' |
| # 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}}"> |
| #!/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" |
| { | |
| "name": "StackPac", | |
| "version": "0.1.0", | |
| "license": "MIT", | |
| "private": true, | |
| "main": "src/index.js", | |
| "repository": { | |
| "type": "git", | |
| "url": "gitlab.com:stack.pac/stackpac.git" | |
| }, |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| pragma solidity ^0.4.24; | |
| /* To Do | |
| -- compare values of two cards | |
| -- for matching against cards already drawn, just loop on random | |
| -- match values in hand and assign uint handScore | |
| -- betting | |
| -- paying in/out | |
| */ |
| var hsh = {win: 0, lose: 0, balance: 1000, bet: 1, biggestBet: 0, odds: 0.66 } | |
| for(i = 1; i <= 1000; i++) { | |
| if(Math.random() <= hsh.odds) { | |
| hsh.win++; | |
| hsh.balance += hsh.bet * 1.5 | |
| hsh.bet = 1; | |
| } else { | |
| hsh.lose++; | |
| hsh.balance -= hsh.bet; |
| Ethereum | |
| 0x723274498dff9d78622ef1978a11aafaccc41db2 |