Skip to content

Instantly share code, notes, and snippets.

View tomazzlender's full-sized avatar
👨‍💻

Tomaz Zlender tomazzlender

👨‍💻
View GitHub Profile
Verifying my Blockstack ID is secured with the address 1JnDm35YSMaQj2Jvzdhn99m2byexDbm2j6 https://explorer.blockstack.org/address/1JnDm35YSMaQj2Jvzdhn99m2byexDbm2j6
root@app:~# cat /var/chef/cache/chef-stacktrace.out
Generated at 2014-12-15 15:23:43 -0500
Chef::Exceptions::MissingRole: The expanded run list includes nonexistent roles: nginx
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/node.rb:362:in `expand!'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/policy_builder/expand_node_object.rb:135:in `expand_run_list'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/policy_builder/expand_node_object.rb:122:in `build_node'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:259:in `build_node'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:420:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.0/lib/chef/client.rb:207:in `fork'
  • Ustvarim droplet
  • Po prvi prijavi dodam v nano /etc/default/locale
LANG=en_US.UTF-8
LANGUAGE=English
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"

Zaganjanje Ubuntu operacijskega sistema z vagrant

  1. Pritisni bližnjico CMD+R -> odpre se okence
  2. Vpiši cmd, pritisni ENTER -> odpre se okno command prompta
  3. Prestavi se v mapo C:... z ukazom cd C:\...
  4. Zaženi vagrant z ukazom vagrant up
  5. Strežnik je zagnan.

Zaganjanje anki serverja

var CustomEvents = (function() {
var _map = {};
return {
subscribe: function(name, cb) {
_map[name] || (_map[name] = []);
_map[name].push(cb);
},
notify: function(name, data) {
@tomazzlender
tomazzlender / unicorn
Created February 22, 2012 14:24 — forked from shapeshed/unicorn
unicorn init.d
/usr/sbin/update-rc.d -f unicorn defaults
chmod +x /etc/init.d/unicorn
/usr/sbin/update-rc.d -f unicorn remove
@tomazzlender
tomazzlender / commands
Created February 22, 2012 14:08
/etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
chmod +x /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx remove
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
end
task :stop, :roles => :app, :except => { :no_release => true } do
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@tomazzlender
tomazzlender / rbenv-install-system-wide.sh
Created February 18, 2012 14:22 — forked from slayer/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu to /opt/rbenv
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /opt/rbenv
# Add rbenv to the path: