This file contains hidden or 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: | |
- rubocop-rails | |
- rubocop-rspec | |
AllCops: | |
EnabledByDefault: true | |
Exclude: | |
- spec/support/spec_helper.rb | |
- spec/rails_helper.rb | |
- db/**/* |
This file contains hidden or 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
class ConfirmationsController < Devise::ConfirmationsController | |
respond_to :json | |
def new | |
render json: nil, status: :not_found | |
end | |
end |
This file contains hidden or 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
function makeCurryFunction(fn, length = fn.length, givenArgs = []) { | |
return function (...newArgs) { | |
const args = [...givenArgs, ...newArgs]; | |
if (args.length >= length) { | |
return fn(...args); | |
} | |
return makeCurryFunction(fn, length, args); | |
} | |
} |
This file contains hidden or 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
// if you need to fire a redux action when a component mounts, | |
// this HOC helps to make that call and keep other components small. | |
import React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import PropTypes from 'prop-types'; | |
class Preloader extends Component { | |
static propTypes = { | |
dispatch: PropTypes.func.isRequired, |
This file contains hidden or 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
function cloneObject(obj, originalStack, cloneStack) { | |
if (typeof obj !== 'object' || obj === null) { | |
return obj; | |
} | |
const cloneIndex = originalStack.indexOf(obj); | |
if (cloneIndex !== -1) { | |
return cloneStack[cloneIndex]; | |
} | |
if (Array.isArray(obj)) { | |
const newArray = new Array(obj.length); |
This file contains hidden or 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
local function new(class, ...) | |
local function lookup(table, key) | |
local getter = class.getters[key] | |
if type(getter) == "function" then | |
return getter(table) | |
end | |
return class.prototype[key] | |
end | |
local function newIndex(t, key, value) | |
local setter = class.setters[key] |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>MMORPG</title> | |
<style> | |
.canvas { | |
position: absolute; |
This file contains hidden or 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
<?php | |
if ($device['os'] == 'eaton-sc') { | |
{ | |
$volt_oid = '.1.3.6.1.4.1.1918.2.13.10.90.10.30.1.40.1'; | |
$descr = "Tension de Bateria"; | |
$volt = snmp_get($device, $volt_oid, '-Oqv'); | |
$type = 'eaton-sc'; | |
$divisor = 100; | |
$index = 0; | |
// $lowlimit = 0; |
This file contains hidden or 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
ffmpeg -i http://ip/mjpg/video.mjpg -async 30 -vcodec libx264 -pix_fmt yuv420p -acodec libfdk_aac -ar 44100 -b:a 64k -threads 0 -s 640x480 -f hls -g 1 -hls_time 10 -hls_list_size 1 -hls_allow_cache 0 index.m3u8 | |
ffmpeg -f mjpeg -r 5 -i http://ip/mjpg/video.mjpg -filter:v scale=w=640:h=480 -f mjpeg pipe:1 |