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
# frozen_string_literal: true | |
# Copyright (c) 2017-2019 SwiftComply | |
# | |
# Grease Trap Back Path | |
module GreaseTrapBackPath | |
extend ActiveSupport::Concern | |
def set_grease_traps_back_path | |
return city_grease_traps_path unless request.referer |
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 { Controller } from 'stimulus'; | |
/** | |
* Add Dynamic File Field To Form | |
*/ | |
class AddFileController extends Controller { | |
static targets = [ "file_inputs", "template" ] | |
appendField(event) { | |
event.preventDefault(); |
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
first_name, last_name = if data.name.present? | |
data.name.split(" ") | |
else | |
[data.first_name, data.last_name] | |
end | |
facebook_data = {"email" => data.email, | |
"given_name" => data.first_name, | |
"family_name" => data.last_name, | |
"given_name" => first_name, |
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
module Opportunities | |
class CustomerReferencesQuery | |
attr_reader :query, :opportunity | |
def initialize(query, opportunity) | |
@basic_query = query | |
@opportunity = opportunity | |
end | |
def call |
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
//HelpContent.js | |
module.exports = function (HelpContent) { | |
HelpContent.test = function() { | |
return true; | |
} | |
} | |
//HelpContent.json |
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
<?php | |
require_once __DIR__.'/vendor/autoload.php'; | |
$app = new Silex\Application(); | |
$app['debug'] = true; | |
$app->register(new Silex\Provider\SecurityServiceProvider()); | |
$app['security.firewalls'] = array( | |
'secured' => array( |
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
angular.module('MTP').factory 'TemplatesBlockBehavior',() -> | |
class TemplatesBlockBehavior | |
allBlocks: -> | |
return @_allBlocks if @_allBlocks | |
@_allBlocks = [] | |
if @blocks | |
for b in @blocks | |
@_allBlocks.push b | |
@_allBlocks = @_allBlocks.concat(b.allBlocks()) | |
@_allBlocks |
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
#!/bin/bash | |
echo "Computers in domain:" | |
smbtree -N | |
echo "----IP Address:" | |
hostname --ip-address | |
echo "----MAC Address:" | |
cat /sys/class/net/enp1s0/address | |
echo "----Dns" | |
nslookup 127.0.0.1 | |
echo "----Routes" |
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
'use strict' | |
var express = require('express'), | |
http = require('http'), | |
Bot = require('messenger-bot'); | |
var Lafka = require('./node_modules/node_lafka/server.js'); | |
const Wit = require('node-wit').Wit; | |
let bot = new Bot({ |
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
var request = require('sync-request'); | |
var express = require('express'); | |
var prequest = require('request-promise'); | |
var urlencode = require('urlencode'); | |
var TelegramBot = require('node-telegram-bot-api'); | |
var bodyParser = require('body-parser'); | |
var app = express(); |