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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use FindBin qw($Bin); | |
use lib "$Bin/../lib"; | |
use Search::Elasticsearch; |
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; | |
use warnings; | |
use DDP; | |
use FindBin qw/$Bin/; | |
use lib "$Bin/../lib"; | |
use Mojo::DOM; | |
use Path::Tiny; |
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 | |
/** | |
* application/core/MY_Controller.php | |
* | |
* All application controllers should extend Base_Controller instead of CI_Controller | |
*/ | |
class Base_Controller extends CI_Controller { | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "box-cutter/ubuntu1604" | |
config.vm.network "public_network", ip: "192.168.2.253" |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "blackbit/php-5.4" | |
config.vm.network "public_network", ip: "192.168.0.138" | |
config.vm.synced_folder "source/", "/var/www/html/", owner: "apache", group: "apache" | |
end |
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/sh | |
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'` | |
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?" |
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 | |
error_reporting(-1); | |
$host = "your-host.tld"; // your websocket url without protocol part | |
$SecWebsocketKey = "your key from websocket connection"; // try wireshark or developer Tools to get this | |
$origin = "http://$host/"; // origin for the header | |
$host = 'localhost'; //where is the websocket server |
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
--Create Procedure WhoLock | |
--AS | |
-- found here: https://stackoverflow.com/questions/8749426/how-to-find-what-is-locking-my-tables/22887440#22887440 | |
if object_id('tempdb..#locksummary') is not null Drop table #locksummary | |
if object_id('tempdb..#lock') is not null Drop table #lock | |
create table #lock ( spid int, dbid int, objId int, indId int, Type char(4), resource nchar(32), Mode char(8), status char(6)) | |
Insert into #lock exec sp_lock | |
if object_id('tempdb..#who') is not null Drop table #who | |
create table #who ( spid int, ecid int, status char(30), |
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 backend from '../backend'; | |
export const LOGIN_START = 'LOGIN_START'; | |
export const LOGIN_ERROR = 'LOGIN_ERROR'; | |
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS'; | |
export const CHANGE_USERNAME = 'CHANGE_USERNAME'; | |
export const CHANGE_PASSWORD = 'CHANGE_PASSWORD'; |
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
// thanks to realPatriot_ from freenode/#react for his code | |
import { configure, shallow, mount } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
import {Form, Dropdown} from 'semantic-ui-react'; | |
import React from 'react'; | |
import ScheduleVisualizerForm from './ScheduleVisualizerForm'; |
OlderNewer