This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Image Preview</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> | |
<style type="text/css"> | |
* { | |
box-sizing: border-box; | |
position: relative; | |
-moz-box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lives in ~/.rspec | |
# update path to formatter.rb as needed - I also put it in ~/ :) | |
--require ~/formatter.rb --format GroupingFormatter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
class SublimeBlockCursor(sublime_plugin.EventListener): | |
def view_is_widget(view): | |
settings = view.settings() | |
return bool(settings.get('is_widget')) | |
def show_block_cursor(self, view): | |
validRegions = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear | |
# 3. Clear 'Processed' and 'Failed' jobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IRremote.h> | |
// FanGates control MOSFET transistors | |
int FanGates[5] = {3,5,6,9,10}; | |
// Individual states for each Gate (on 1/off 0) | |
int FanState[5] = {0}; | |
// Array of power levels for each fan | |
int FanSpeeds[5] = {0}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define :guitar_chords do | |
in_thread do | |
4.times do | |
with_fx :echo, mix: 0.3, phase: 0.25 do | |
sample :guit_em9, rate: 1 | |
end | |
sleep 4 | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int pulseSpeed = 5; | |
int ldrPin = 0; | |
int redLed = 10; | |
int greenLed = 11; | |
int blueLed = 9; | |
int ambientLight; | |
int power = 150; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "planck.h" | |
#define _QW 0 | |
#define _CM 1 | |
#define _DV 2 | |
#define _LW 3 | |
#define _RS 4 | |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
[_QW] = { /* Qwerty */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'RMagick' | |
include Magick | |
puts "Enter the path to the image you wish to analyze:" | |
file = gets.chomp | |
image = Magick::ImageList.new(file) | |
q = image.quantize(10, Magick::RGBColorspace) | |
palette = q.color_histogram.sort {|a, b| b[1] <=> a[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is my text editor. There are many like it, but this one is mine. | |
My text editor is my best friend. It is my life. I must master it as I must master my life. | |
My text editor, without me, is useless. Without my text editor, I am useless. I must use my text editor efficiently. | |
I must code faster than my approaching deadline which is trying to kill me. I must debug before it arrives. I will... | |
My text editor and I know that what counts in this project is not the lines of code we write, the automated testing, nor the code linters we use. |
NewerOlder