Skip to content

Instantly share code, notes, and snippets.

View kurochan's full-sized avatar
🎯
Focusing

Kurochan kurochan

🎯
Focusing
View GitHub Profile
require 'rmagick'
#include Magick
white = Magick::Pixel.new(255*256,255*256,255*256)
img1 = Magick::Image.read('sample6.jpg').first
img1.each_pixel {|pixel,x,y|
if pixel.to_color != "red" then
img1.pixel_color(x,y,white)
@higebu
higebu / mkimage_vyos.sh
Last active January 16, 2017 09:30
mkimage_vyos.sh
#!/bin/bash
# You need to install overlayroot
# sudo apt-get install overlayroot
LANG=C
set -e
set -x
@pochi
pochi / 0_README.md
Last active August 29, 2015 14:08
Spark Streaming Reading

Description

Spark Streamingのサンプルコードがどのように動作しているか確認する。 なお、今回はKafkaを利用してStreamingし、Elastic Searchのインデキシングする例を考える。

前提

  • Spark Streaming: v1.1.0
  • Local environemnt on Mac OX
@colestanfield
colestanfield / gist:fac042d3108b0c06e952
Created August 8, 2014 22:55
sbt-assembly merge strategy for aop.xml files
// Create a new MergeStrategy for aop.xml files
val aopMerge: MergeStrategy = new MergeStrategy {
val name = "aopMerge"
import scala.xml._
import scala.xml.dtd._
def apply(tempDir: File, path: String, files: Seq[File]): Either[String, Seq[(File, String)]] = {
val dt = DocType("aspectj", PublicID("-//AspectJ//DTD//EN", "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"), Nil)
val file = MergeStrategy.createMergeTarget(tempDir, path)
@uneco
uneco / animal.js
Last active March 25, 2024 12:49
動物の名前一覧
window.animals = [
"イヌ",
"ウシ",
"ウマ",
"オス",
"カバ",
"クマ",
"サイ",
"サル",
"シカ",