Skip to content

Instantly share code, notes, and snippets.

View gusano's full-sized avatar
👾
React.js, Remix.run, frontend

Yvan Volochine gusano

👾
React.js, Remix.run, frontend
View GitHub Profile
@gusano
gusano / gist:1097068
Created July 21, 2011 12:13
vagrant error
[default] Destroying VM and associated drives...
/usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:102:in `block in spec_to_proc': undefined method `name' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:41:in `call'
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:41:in `read_interface_attribute'
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:22:in `load_interface_attribute'
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:13:in `block in load_interface_attributes'
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:12:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/virtualbox-0.9.0/lib/virtualbox/abstract_model/interface_attributes.rb:12:in `l
@gusano
gusano / gist:1229379
Created September 20, 2011 15:17
django Model example
class Category(models.Model):
"""Category for posts"""
name = models.CharField(max_length=50)
has_children = models.BooleanField(default=0)
is_sub = models.BooleanField(default=0)
parent = models.CharField(max_length=50, null=True, blank=True)
position = models.IntegerField()
visible = models.BooleanField(default=1)
@gusano
gusano / gist:1379140
Created November 19, 2011 18:04
Splines error
ERROR: Message 'flow' not understood.
RECEIVER:
Instance of PageLayout { (0xb18449d0, gc=20, fmt=00, flg=00, set=03)
instance variables [5]
window : instance of QWindow (0x9d4f910, size=7, set=3)
view : instance of FlowView (0xb188f850, size=5, set=3)
isClosed : false
boundsWereExplicit : true
autoRemoves : instance of Array (0xb17804d0, size=1, set=0)
}
@gusano
gusano / gist:2629039
Created May 7, 2012 17:13
virtualbox errorwith vagrant
DEBUG network: Network not found. Creating if we can.
INFO subprocess: Starting process: ["VBoxManage", "hostonlyif", "create"]
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: VBoxManage: error: Unable to create a host network interface
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Host, interface IHost, callee nsISupports
Context: "CreateHostOnlyNetworkInterface (hif.asOutParam(), progress.asOutParam())" at line 64 of file VBoxManageHostonly.cpp
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 11
ERROR warden: Error occurred: There was an error executing the following command with VBoxManage:
@gusano
gusano / gist:4064782
Created November 13, 2012 09:09
NI Audio2dj ~/.asoundrc
# Setup for NI audio2dj
# It's seen by default as 2 different stereo devices by jack.
# This makes it one single 4 output channels device.
# The outputs are then mapped so instead of using a stereo cable in output0,
# I can use 2 mono jack cables in each stereo out, i.e. in L[0] and R[0]
# which are respectively output 0 and 2.
pcm_slave.DJ0 {
pcm "hw:1"
format S16_LE
@gusano
gusano / gist:4065181
Created November 13, 2012 10:53
Highlight SuperCollider evaluated code via pulse
diff --git a/editors/scel/el/sclang-interp.el b/editors/scel/el/sclang-interp.el
index b254038..ce38fed 100644
--- a/editors/scel/el/sclang-interp.el
+++ b/editors/scel/el/sclang-interp.el
@@ -545,7 +545,8 @@ if PRINT-P is non-nil. Return STRING if successful, otherwise nil."
(interactive "P")
(let ((string (sclang-line-at-point)))
(when string
- (sclang-eval-string string (not silent-p)))
+ (sclang-eval-string string (not silent-p))
@gusano
gusano / .zshrc
Created November 22, 2012 12:52
.zshrc
# Don't kill jobs when logout ---------------------------------------
setopt nohup
# prompt ------------------------------------------------------------
PS1=$'%{\e[1;36m%}(%{\e[31m%}%30<..<%~%{\e[36m%}) %{\e[36m%}%#%b %{\e[0m%}'
if [ "`id -u`" -eq 0 ]; then
export RPS1=$'%{\e[37m%}%{\e[1;30m%}%{\e[7m%} %M %{\e[0m%}'
else
export RPS1=$'%{\e[37m%}%{\e[1;30m%} %M %{\e[0m%}'
fi

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>
  <img src="masthead">
</header>

<footer>
@gusano
gusano / gist:5248700
Created March 26, 2013 20:05
First try at implementing scide auto-insertion of matching parentheses, brackets and quotes
From f697c99198f1c4d600fb487ff3d149a4ddbd468f Mon Sep 17 00:00:00 2001
From: Yvan Volochine <[email protected]>
Date: Tue, 26 Mar 2013 13:49:34 -0500
Subject: [PATCH] Scide: first implementation of parentheses, brackets, quotes
auto-pairing
Signed-off-by: Yvan Volochine <[email protected]>
---
editors/sc-ide/widgets/code_editor/sc_editor.cpp | 53 ++++++++++++++++++++++++
editors/sc-ide/widgets/code_editor/sc_editor.hpp | 1 +
@gusano
gusano / gist:5336265
Created April 8, 2013 11:52
Delete all branches that are already merged into the currently checked out branch.
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d