View react-sign-code
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 React from 'react'; | |
import { Link } from 'react-router-dom'; | |
import { Button, Row, Col, Form, Card, Spinner, Container, Table } from 'react-bootstrap'; | |
import AlarmAlert from '../common/alerts'; | |
import { httpRequest } from '../../js/common'; | |
class HomeSignUpdate extends React.Component { | |
constructor(props) { | |
super(props); | |
this.mounted = false; |
View sign-express-example
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
// include dependencies | |
import express from 'express'; | |
import bodyParser from 'body-parser'; | |
import fallback from 'express-history-api-fallback'; | |
import path from 'path'; | |
import Sign from './sign'; | |
const app = express(); | |
const sign = new Sign(); |
View screen-sign-class
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 SerialPort from 'serialport'; | |
class Sign { | |
static hexEncode(string) { | |
const result = []; | |
for (let i = 0; i < string.length; i++) { | |
const hex = string.charCodeAt(i).toString(16); | |
result.push(('00x' + hex).slice(-4)); | |
} | |
return result; |
View hurr durr powershell folder redirect no worky!
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
<# | |
Script to reset user folder permissions. | |
Uses: icacls.exe and takeown.exe | |
Tested on Server 2008 R2 X64 | |
For all folders in base folder: | |
1. Recursively resets owner to Administrators | |
2. Reset folder to inherit permissions and apply to subfolders/files, clearing any existing perms | |
3. Add user (based on folder name) with full control and apply to subfolders/files | |
4. Recursivley reset owener to user (based on folder name) | |
#> |
View telnet-cms-e7-remote-timer.sh
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/expect | |
set ont [lindex $argv 0] | |
# Arg is the ONT Profile number | |
set timeout 20 | |
spawn telnet 10.10.10.10 9199 | |
#The script expects login | |
expect ">" |
View gist:1d2df9750fb506844629
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 | |
/* | |
* Make sure the class only exists once | |
*/ | |
if ( !class_exists( 'DB' ) ) { | |
/** | |
* Class for mysql | |
*/ |