用root登陆,修改root密码:
passwd
创建用户
| #!/bin/sh | |
| # run | |
| # curl http://ow.ly/JI3j3 | sh | |
| mkdir -p /tmp/chef-install && cd /tmp/chef-install | |
| wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.4.0-1_amd64.deb | |
| sudo dpkg -i *.deb | |
| cd && rm -rf /tmp/chef-install |
| filename = 'a.mp4' | |
| target_path = '../processing' | |
| (1..8).each do |i| | |
| t = i * 60 | |
| target_file = File.join(target_path, "#{i}.jpg") | |
| `avconv -i #{filename} -ss #{t} -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 '#{target_file}'` | |
| end | |
| image_files = File.join target_path, '*.jpg' | |
| `convert -delay 50 -loop 0 #{image_files} #{filename}.gif` |
| require 'benchmark' | |
| a = (1..1000).to_a | |
| lookup = 100000.times.map{(rand*1000).to_i} | |
| puts "for index" | |
| puts Benchmark.measure { | |
| lookup.each{ |i| a.index(i) } |
| mylib.close_to_tray = -> | |
| gui = require('nw.gui') | |
| win = gui.Window.get() | |
| tray = null | |
| win.on 'close', -> | |
| this.hide() | |
| tray = new gui.Tray({ icon: 'icon.jpg' }) |
| #!/bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: god | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: God | |
| ### END INIT INFO |
| //-*-coding:utf-8-*- | |
| //---------------------------------------------------------- | |
| // module: 1132 | |
| //---------------------------------------------------------- | |
| #include <cstdio> | |
| #include <cmath> | |
| #include <algorithm> | |
| #include <vector> |
| 11:58:24 write 0.000010 ruby | |
| 11:58:25 read 0.510431 W ruby | |
| 11:58:25 write 0.000010 ruby | |
| 11:58:25 ioctl 0.000027 W ruby | |
| 11:58:25 open lida/.rvm/gems/ruby-2.0.0-p247/gems/coderay-1.0.9/lib/coderay/tokens_proxy.rb 0.000036 ruby | |
| 11:58:25 fcntl 0.000002 ruby | |
| 11:58:25 fstat64 0.000004 ruby |
| import std.stdio; | |
| import std.socket; | |
| import std.string; | |
| import std.conv; | |
| import std.random; | |
| import std.outbuffer; | |
| import core.thread; | |
| int main() { | |
| auto s = new TcpSocket(); |