Skip to content

Instantly share code, notes, and snippets.

View zloydadka's full-sized avatar

Alexander Andrianov zloydadka

View GitHub Profile
@zloydadka
zloydadka / 20-nouveau.conf
Created October 9, 2013 14:35
Nvidia card dual head monitor config
Section "Monitor"
Identifier "NEC"
Option "PreferredMode" "1280x1024_60.00"
EndSection
# the left one
Section "Monitor"
Identifier "FUS"
Option "PreferredMode" "1280x1024_60.00"
Option "LeftOf" "NEC"
@zloydadka
zloydadka / example2.vba
Created October 16, 2011 16:31
RegExp in VBA example 2
Option Explicit
#Const LateBind = True
Function RegExpSubstitute(ReplaceIn, _
ReplaceWhat As String, ReplaceWith As String)
#If Not LateBind Then
Dim RE As RegExp
Set RE = New RegExp
#Else
Dim RE As Object
@zloydadka
zloydadka / vba_examples.vba
Created October 16, 2011 16:29
RegExp in VBA examples
Sub Test()
Const strTest As String = "qwerty123456uiops"
MsgBox RE6(strTest)
End Sub
Function RE6(strData As String) As String
Dim RE As Object, REMatches As Object
Set RE = CreateObject("vbscript.regexp")
With RE
@zloydadka
zloydadka / file.rb
Created October 3, 2011 04:55
Write a simple init.d ruby startup script
#!/usr/local/bin/bootup_ruby
# this is /my/daemon/file
require 'rubygems'
require 'daemons'
Daemons.run('main.rb')
#main.rb is the real script