Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| FROM ruby:2.4-alpine | |
| ENV PATH /root/.yarn/bin:$PATH | |
| RUN apk update && apk upgrade && \ | |
| apk add --no-cache bash git openssh build-base nodejs tzdata | |
| RUN apk update \ | |
| && apk add curl bash binutils tar gnupg \ | |
| && rm -rf /var/cache/apk/* \ |
| #!/bin/bash | |
| # HOSTLIST="ips" bash < <(curl -fsSL https://gist.github.com/fanminjian/e3f5a07f51a9d423b800edb754bb4e06/raw) | |
| # Hostname | |
| node=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' | sed -r 's!/.*!!; s!.*\.!!'` | |
| hostname="node$node" | |
| echo $hostname > /etc/hostname |
| # In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
| # variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
| # in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
| # gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
| # Add the following to your shell init to set up gpg-agent automatically for every shell | |
| if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
| source ~/.gnupg/.gpg-agent-info | |
| export GPG_AGENT_INFO | |
| else |
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQINBFez+4UBEADaqzQKbv2k5Jb3j+8x9zFutf5BzsSIAOMoVkEUbkVlAXyR8l7b | |
| +DbdxYEZutqYmhcDfegGpBDRuyyakL7+HL9nfWXlHqIMlENMocerev887AMpZBE+ | |
| 7gdU0VDyqA4D7aqgYL9NwI7C635aF2eWMfYhz8ayAYI44d79XmVAFYcC7O7HQCY/ | |
| VXWFohRQYIUtDW/pBrx+Rbyp7oGOYwH4Wq1VaR3z/uFkixq3RRhZPp53p/ZvjWo/ | |
| wSpuWtJb671nMvkYzu4mEWaLy95QFunmaPXge1SQhq8s/eBBrc/g0mEOyD9qd1B5 | |
| VM09Y3ds7cS5bFUURZSWwWnW7gVLsazy28fSvqnHmeDLvjEcH1BWn89Iyr23giVI | |
| r4chFL2N9AtaAI+nMLNXJLmmA7MwfnhZtY4OFtAWQHA8tcObYmBVGcnQMfPlpmzL | |
| c7hM2F2XMUWFXS+DPv6CuVB6Uf8XGNTLpG+Hpzxalb5x86PTVBpiOHQIIu7hxc76 |
| Rails.application.configure do | |
| config.assets.debug = false | |
| end |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| times = [].tap { |a| 24.times { |i| a << (DateTime.parse("2015-04-01 03:00").to_f - i*3600) }} | |
| times.each {|t| Scheduled::Practices::MonthlyInvoices.new.perform(nil, t) } |
| # lib/tasks/deploy.rake | |
| namespace :deploy do | |
| desc 'Deploy to staging environment' | |
| task :staging do | |
| exec 'mina deploy -f config/deploy/staging.rb' | |
| end | |
| end |
| # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
| # that enables you to choose a character from a menu of options. If you are on Lion | |
| # try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
| # for input. | |
| # | |
| # It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
| # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
| # as it means you cannot press and hold h/j/k/l to move through your file. You have | |
| # to repeatedly press the keys to navigate. |