Skip to content

Instantly share code, notes, and snippets.

class Light {
color col;
int state;
float x;
float y;
Light(color c) {
col = c;
}
void on() {
@rumikotakahashi
rumikotakahashi / mdxfind-is-awesome.txt
Created September 4, 2017 05:31 — forked from roycewilliams/mdxfind-is-awesome.txt
mdxfind-is-awesome.txt
# Courtesy MDXfind - https://hashes.org/mdxfind.php
$ echo -n 'password' | mdxfind -h ALL -h '!salt,!user' -z -f /dev/null -i 5 stdin 2>&1| fgrep password
MD5x01 5f4dcc3b5aa765d61d8327deb882cf99:password
MD5UCx02 3b73cca8b7d9d93a834631fb22769334:password
MD5UCx03 cfe84923ede1864f2e2799b8ff3f80a0:password
MD5UCx04 aaa0cc98c7dc4ab6fd12433f097107d9:password
MD5UCx05 55c2088741f794223bda2d09c4d61c75:password
MD4x01 8a9d093f14f8701df17732b2bb182c74:password
MD4x02 143409f027a6cfde772e3c97b126d9f5:password
MD4x03 b99ae7e24616cc845f20048074d4d415:password
@rumikotakahashi
rumikotakahashi / quiz.js
Created September 4, 2017 05:28 — forked from lspdv/quiz.js
Given the following code, I understand what the output will be:
const obj = {
name: 'John',
getName () {
return this.name;
}
};
const name1 = obj.getName();
const getName = obj.getName;
const name2 = getName();
@rumikotakahashi
rumikotakahashi / GradientLine.swift
Created September 4, 2017 05:26 — forked from williamhqs/GradientLine.swift
CoreGraphics draw a line with gradient and lineCap
class GradientLineView: UIView {
override func draw(_ rect: CGRect) {
if let context = UIGraphicsGetCurrentContext() {
let startPoint1 = CGPoint(x: 20, y: rect.height/2)
let endPoint1 = CGPoint(x: rect.width-120, y: rect.height/2)
context.setLineWidth(15)
context.move(to: startPoint1)
context.addLine(to: endPoint1)
context.setLineCap(.round)
ok - 2017-09-04T07:17:01+02:00
@rumikotakahashi
rumikotakahashi / ByteComparer.cs
Created August 29, 2017 05:32 — forked from itn3000/ByteComparer.cs
byte array comparer(inspired by Messagepack-CSharp and System.Span<T>)
using System;
static class Util
{
public static bool AreSameSpan(byte[] b1, byte[] b2)
{
var span = new Span<byte>(b1);
var span2 = new Span<byte>(b2);
return span.SequenceEqual(span2);
}
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.1 virtualenv at ~/mudhaaenv" project-jdk-type="Python SDK" />
</project>
@rumikotakahashi
rumikotakahashi / slide_count.js
Created August 29, 2017 05:30 — forked from iiiBird/slide_count.js
slick slide count and all slides
$('.gallery-slider-thumb').on('init', function(event, slick, currentSlide, nextSlide){
var currentSlide = slick.currentSlide + 1;
var slideCount = slick.slideCount;
$(this).parents('.gallery-slider-thumb-wr').find('.gs-count__current').text(currentSlide);
$(this).parents('.gallery-slider-thumb-wr').find('.gs-count__all').text(slideCount);
});
$('.gallery-slider-thumb').on('afterChange', function(event, slick, currentSlide, nextSlide){
var currentSlide = slick.currentSlide + 1;
$(this).parents('.gallery-slider-thumb-wr').find('.gs-count__current').text(currentSlide);
@rumikotakahashi
rumikotakahashi / install-erlang-manually.md
Created August 29, 2017 05:29 — forked from mortymacs/install-erlang-manually.md
Install Erlang From Source code Wothout wx and doc

Requirements

$ apt-get install libncurses5-dev

Manually

$ wget -c http://erlang.org/download/otp_src_19.3.tar.gz
$ tar xzf otp_src_19.3.tar.gz
$ cd otp_src_19.3/
@rumikotakahashi
rumikotakahashi / gist:3974f6c9839742f54836d76fc71d8252
Created August 29, 2017 05:27 — forked from davo/gist:5bae0e49affc117765c796f9c6b8eace
CoffeeScript Style Guide (using no prototype)
### flipjs.io CoffeeScript Style Guide ###
do ->
############################################################ CLASS ###
class Animal
constructor: (@name) ->
initProps = =>