Skip to content

Instantly share code, notes, and snippets.

View kumekay's full-sized avatar

Sergei Silnov kumekay

View GitHub Profile
@kumekay
kumekay / GalileoBMP085.ino
Last active August 29, 2015 14:23
Galileo sketches
#include <Wire.h>
#include <Adafruit_BMP085.h>
//
Adafruit_BMP085 bmp;
void setup() {
Serial.begin(9600);
if (!bmp.begin()) {
Serial.println("Could not find BMP085 sensor");
@kumekay
kumekay / mindwave.ino
Created June 27, 2015 10:22
MindWave
////////////////////////////////////////////////////////////////////////
// Arduino Bluetooth Interface with Mindwave
//
// This is example code provided by NeuroSky, Inc. and is provided
// license free.
////////////////////////////////////////////////////////////////////////
#define LED 13
#define BAUDRATE 57600
#define DEBUGOUTPUT 0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kumekay
kumekay / redbutton.css
Created October 24, 2012 08:46
Красная кнопка Октопус-ДВ
.btn-red {
background-color: hsl(360, 100%, 36%) !important;
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f40000", endColorstr="#b70000");
background-image: -khtml-gradient(linear, left top, left bottom, from(#f40000), to(#b70000));
background-image: -moz-linear-gradient(top, #f40000, #b70000);
background-image: -ms-linear-gradient(top, #f40000, #b70000);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f40000), color-stop(100%, #b70000));
background-image: -webkit-linear-gradient(top, #f40000, #b70000);
background-image: -o-linear-gradient(top, #f40000, #b70000);
@kumekay
kumekay / loco_editor_install
Created November 27, 2012 22:01
gem install locomotive_editor -v 1.0.0.rc15 --debug
gem install locomotive_editor -v 1.0.0.rc15 --debug
Exception `NameError' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::EAGAIN' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EEXIST' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/fileutils.rb:247 - File exists - /home/ku/.gem/specs/modules.locomotivecms.com%80
Exception `Errno::EAGAIN' at /home/ku/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errn
@kumekay
kumekay / ard.pde
Last active December 15, 2015 07:59
Мастер класс Ардуино
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
void setup() {
size(512, 512);
arduino = new Arduino(this, Arduino.list()[0], 57600);
}
Deface::Override.new(:name => "remove billing address form",
:virtual_path => "spree/checkout/_address",
:remove => "#billing[data-hook]"
)
Deface::Override.new(:name => "remove use billing address checkbox",
:virtual_path => "spree/checkout/_address",
:remove => "[data-hook='use_billing']"
)
@kumekay
kumekay / capture_and_copy.bat
Last active December 18, 2015 00:08
Web-camera auto shot every minute and copy it to dropbox + web page to see it
:sleep
ping 127.0.0.1 -n %1 -w 1000 > NUL
:top
set time_stamp=%DATE:~0,2%%DATE:~3,2%%DATE:~6,4%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%
"C:\Program Files (x86)\VideoLAN\VLC\vlc" --dshow-vdev="Logitech HD Webcam C510" --dshow-size=1280x720 --dshow-aspect-ratio=16\:9 -V dummy --intf=dummy --dummy-quiet --video-filter=scene --no-audio --scene-path=F:\cherem --scene-format=jpeg --scene-prefix=%time_stamp% --scene-replace --run-time=1 --scene-ratio=24 "dshow://" vlc://quit
copy f:\cherem\%time_stamp%.jpeg c:\users\ku\Dropbox\Public\cherem.jpg
CALL :sleep 60
goto top
@kumekay
kumekay / .htaccess
Created June 26, 2013 17:02
http simple auth apache
<Location />
AuthType Basic
AuthName " Test Environment"
AuthUserFile '/path/pass'
Require valid-user
</Location>