Skip to content

Instantly share code, notes, and snippets.

View artm's full-sized avatar

Artem Baguinski artm

  • Performation B.V.
  • Emmen, NL
  • 22:40 (UTC +02:00)
View GitHub Profile
artm@parurak:~/src/dpi/dashboards/kraamzorgcompleet
$ grep -R "_chain_ =" bower_components/dash.js/src | sed -r 's/.*: //;s/\._chain_ = /({...}) -> /;s/"(.*)";/\1/;s/terminate/-/' | column -t
Plain.with({...}) -> Plain
Plain.split({...}) -> Split
Plain.filter({...}) -> Plain
Plain.extract({...}) -> Plain
Plain.size({...}) -> -
SubSplit.sum({...}) -> LabeledNumbers2D
SubSplit.highcharts({...}) -> -
LabeledNumbers2D.mul({...}) -> LabeledNumbers2D
artm@parurak:~/src/artm/so/test/foo
$ ls | sort
a
b
c
d
e
F
artm@parurak:~/src/artm/so/test/foo
$ rake db:migrate
== 20141127094407 AddHospitalsUsers: migrating ================================
-- create_table(:hospitals_users)
-> 0.0877s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Validatie mislukt: Email is al in gebruik/home/artm/src/dpi/GN_Guide/vendor/bundle/gems/activerecord-4.1.4/lib/active_record/validations.rb:57:in `save!'
@artm
artm / PointLib.cginc
Created June 25, 2011 09:49
Manual Billboarding
// Shift a billboard corner size pixels along its corner
inline void Billboard(inout float4 pos, in float2 corner, float size)
{
pos.xy += (size * 2.0 / _ScreenParams.xy) * corner * pos.w;
}
// structures used to pass input output between shader stages
struct PointVIn {
float4 vertex : POSITION;
float4 texcoord : TEXCOORD;
@artm
artm / opencv-ffmpeg-0.8.patch
Created June 25, 2011 18:17
building OpenCV-2.3 against ffmpeg-0.8 (both their latest stable)
diff --git a/modules/highgui/src/cap_ffmpeg.cpp b/modules/highgui/src/cap_ffmpeg.cpp
index ec44548..9c48f96 100644
--- a/modules/highgui/src/cap_ffmpeg.cpp
+++ b/modules/highgui/src/cap_ffmpeg.cpp
@@ -468,7 +468,7 @@ bool CvCapture_FFMPEG::open( const char* _filename )
AVCodecContext *enc = &ic->streams[i]->codec;
#endif
- if( CODEC_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
+ if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
@artm
artm / brew-install.patch
Created July 5, 2011 16:39
Brew compliant install target for mpeg_stat
diff --git a/Makefile b/Makefile
index 48aedd1..a6c5be2 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ CFLAGS = $(DEBUGFLAG) $(INCLUDEDIR)
# for SunOS cc, just use the above
# for cc on HPUX:
-HP-CC-FLAGS = -Aa $(CFLAGS) -D_HPUX_SOURCE -DBSD -DNONANSI_INCLUDES
+# HP-CC-FLAGS = -Aa $(CFLAGS) -D_HPUX_SOURCE -DBSD -DNONANSI_INCLUDES
@artm
artm / groupwrap.rb
Created March 10, 2012 21:35
Subpattern wrapper
class GroupWrap
def initialize(&block)
@wrap = block
@transformers = []
end
def handle(pattern, *tags)
@transformers << [pattern, *tags]
end
@artm
artm / shorter
Created March 15, 2012 15:34 — forked from pita5/gist:2044780
template.gsub!('{{CONNECT_MEETING_099}}', delegate[12] || '')
set viminfo=!,'100,<50,s10,h
au VimLeavePre * let g:BG = &background
au VimEnter * if exists("g:BG") | let &background = g:BG | endif
@artm
artm / bg.rb
Created March 20, 2012 15:28
fail in bg the second time around
Given /^I puts "([^"]*)"$/ do |arg1|
if !$ran
puts arg1
$ran = arg1 == 'fg1'
else
true.should == false
end
end