Skip to content

Instantly share code, notes, and snippets.

Victor Nawothnig dminuoso

Block or report user

Report or block dminuoso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3cb4b013f77188c2c4220d339b025377
self.num_reserved = order_data.match(/\"ordered\"\:.*\n/)[0].match(/\d+/)[0]
View application.html.haml
- if Rails.env.production?
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
ga('create', 'UA-15209814-7', 'auto');
ga('send', 'pageview');
View foo.js
// The call with a callback to self
try {
winfo = windarea.getWindInfo2(, LonLat.lon, this.time, wante, wpost);
//this.drawWind(ctx, p.x, p.y, winfo);
var MI = GribMgr.WindAtPointInTime(new Date(this.time*1000),, LonLat.lon,
function(){this.drawWindArea(p, poslimit, windarea, ctx)})
if (MI)
winfo = new Wind(MI.Speed, MI.Heading);
this.drawWind(ctx, p.x, p.y, winfo);
View random.rb
[0,1,2,3,4,5,6,7,8,9].select do |x|
x if x%2==0
View random.rb
takeEven = do |x|
x if x % 2 == 0
View random.rb
takeEven = do |x|
x if x % 2 == 0
View some.js
// Arrow function
$("#ajax-action2").click(() => {
const AUTH_TOKEN = $("meta[name=csrf-token]").attr("content");
// const
const request = $.ajax({
type: "PATCH",
url: "/home/no_js_view_action",
headers: {
View ajax.js
$("#ajax-action2").click( function() {
const AUTH_TOKEN = $("meta[name=csrf-token]").attr("content");
request = $.ajax({
type: "PATCH",
url: "/home/no_js_view_action",
headers: {
dataType: "json",
data: {
View foo.js
const toggleClass = (id, toggle) => id === toggle ? 'toggle active' : 'toggle inactive';
const Style = ({ activeFontColor, activeBackgroundColor, fontColor }) => (
<style jsx>
.toggle {
width: 50%;
height: 50px;
border-radius: 100px;
line-height: 50px;
dminuoso / Sentinel.hs
Created Jul 20, 2018 — forked from borsboom/Sentinel.hs
hedis wrapper for Redis Sentinel support
View Sentinel.hs
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, MultiParamTypeClasses, NamedFieldPuns,
NoImplicitPrelude, OverloadedStrings, RankNTypes, ScopedTypeVariables, TupleSections,
ConstraintKinds, TemplateHaskell, StandaloneDeriving #-}
{-# OPTIONS_GHC -funbox-strict-fields -Wall -Werror #-}
-- dependencies: hedis retry safe data-default uuid monad-logger basic-prelude lifted-base either
-- | Wrapper for hedis to support redis-sentinel. It is
-- built-atop of, and re-exports most of, the "Database.Redis" module.
You can’t perform that action at this time.