Skip to content

Instantly share code, notes, and snippets.

source ~/.vim/vimrc
" Auto save when focus lost and ignore warnings from untitled buffers
:au FocusLost * silent! :wa
" Save on buffer switch
:set autowriteall
set runtimepath+=~/.vim/vim-objj
au BufNewFile,BufRead *.j,Jakefile setf objj
" au! BufRead,BufNewFile *.json set filetype=json
autocmd BufNewFile,BufRead *.json set ft=javascript
autocmd BufNewFile,BufRead *.prawn set ft=ruby
" Auto save when focus lost and ignore warnings from untitled buffers
:au FocusLost * silent! :wa
" Save on buffer switch
:set autowriteall
set runtimepath+=~/.vim/vim-objj
au BufNewFile,BufRead *.j,Jakefile setf objj
" au! BufRead,BufNewFile *.json set filetype=json
autocmd BufNewFile,BufRead *.json set ft=javascript
autocmd BufNewFile,BufRead *.prawn set ft=ruby
au BufRead,BufNewFile /opt/nginx/conf/* set ft=nginx
@Houdini
Houdini / gbrt
Created September 15, 2013 20:45
#!/usr/bin/env ruby
def format_commit_info timestamp, time_desc, commit_id, message, ref_name
[
"#{timestamp.strftime("%y %b %d")}, #{timestamp.strftime("%l:%M%p").downcase}",
"(#{time_desc})",
commit_id,
message,
ref_name
]
source ~/.vim/vimrc
" Auto save when focus lost and ignore warnings from untitled buffers
:au FocusLost * silent! :wa
" Save on buffer switch
:set autowriteall
set runtimepath+=~/.vim/vim-objj
au BufNewFile,BufRead *.j,Jakefile setf objj
" au! BufRead,BufNewFile *.json set filetype=json
autocmd BufNewFile,BufRead *.json set ft=javascript
autocmd BufNewFile,BufRead *.prawn set ft=ruby
* (1)
* hello.mixal: say 'hello world' in MIXAL (2)
* (3)
* label ins operand comment (4)
TERM EQU 19 the MIX console device number (5)
ORIG 1000 start address (6)
START OUT MSG(TERM) output data at address MSG (7)
HLT halt execution (8)
MSG ALF "MIXAL" (9)
ALF " HELL" (10)
ubuntu@ip-10-0-1-86:/usr/lib/ssl/certs$ sudo chef-server-ctl test
Configuring logging...
Creating platform...
Starting Pedant Run: 2013-06-26 15:24:19 UTC
setting up rspec config for #<Pedant::OpenSourcePlatform:0x000000036b5820>
Configuring RSpec for Open-Source Tests
_______ _______ _______ _______ _______ ______ _______
| || || || || || | | |
| _ || _ || _____|| || _ || _ || ___|
| | | || |_| || |_____ | || | | || | | || |___
10.0.1.94 deploy_revision("/mili/cryptopro_proxy") do
10.0.1.94 provider Chef::Provider::Deploy::Revision
10.0.1.94 action [:force_deploy]
10.0.1.94 updated true
10.0.1.94 supports {:restart=>true}
10.0.1.94 retries 0
10.0.1.94 retry_delay 2
10.0.1.94 deploy_to "/mili/cryptopro_proxy"
10.0.1.94 environment {"RAILS_ENV"=>"production", "LC_ALL"=>"C"}
10.0.1.94 repository_cache "cached-copy"
#!/bin/bash
function check_fail(){
if test $1 -ne 0; then
echo " Installation failed. LSB package may not be installed.
Install LSB package and reinstall CryptoPro CSP. If it does not help, please
read installation documentation or contact the manufacturer: support@cryptopro.ru."
exit $1
fi
}
class User < ActiveRecord::Base
self.default_timezone = 'Moscow' # работает на запись
# ...
end
1.8.7 :002 > User.first.act_ts
=> Sat, 20 Mar 2010 07:06:25 UTC +00:00
# нельзя поменять с change
@Houdini
Houdini / gist:1917959
Created February 26, 2012 17:55
cubiс_equation.py
# encoding: utf8
import pylab, math
# Задание переменных
delta_omega_1 = 0.1
delta_omega_2 = 0.2
omega_2_omega_1 = 10.0
gamma = 2.0
# левая и правая границы графика