Skip to content

Instantly share code, notes, and snippets.

View jmurphyau's full-sized avatar

James Murphy jmurphyau

View GitHub Profile
import Ember from 'ember';
export default Ember.Object.extend({
previousUnauthorizedTransition: null,
token: null,
username:null
});
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
login: function(a,b,c,d) {
var me = this, data = this.getProperties('username','password');
Ember.$.post('/admin/login',data).then(function(response) {
me.session.set('token',response.substring(0,50));
console.log("token inside controller.login",me.session.get('token'));
export default Ember.Object.extend({
previousUnauthorizedTransition: null,
token: localStorage.token,
username:null,
tokenChanged: function() {
localStorage.token = this.get('token');
}.observes('token')
})
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@jmurphyau
jmurphyau / test-ip-port.cmd
Last active July 17, 2019 05:25
One line powershell to check open ports
powershell -noprofile -command "& { function conn([string]$h,[int]$p) {$c=New-Object System.Net.Sockets.TcpClient; try {$c.connect($h, $p);return [byte]($c.Connected);}catch{return 0}} function hostport([string]$s){$r=($s -match \"^((?:\d{1,3}\.){3}\d{1,3}):(\d{1,6})$\");$m=$matches;return ($r,$m[1],$m[2])} function chk([string]$dest) { $hp=hostport $dest; if ($hp[0]) { write-host (\"Connection to {0}:{1} = {2}\" -f ($hp[1],$hp[2],@(\"Failed\",\"Success\")[(conn $hp[1] $hp[2])])) } else { write-host (\"Invalid: {0}\" -f $dest) } } foreach ($a in $args) {chk $a} }" 127.0.0.1:22 127.0.0.1:80
@jmurphyau
jmurphyau / tomcat-log-maxday-settings.md
Last active April 18, 2018 02:43
Change tomcat log rollover

Tomcat maxDay Log Settings

Below is the information required to change the default log retention for Tomcat

conf/logging.properties

Add .maxDays = 14 to each handler, for example:

Before:

@jmurphyau
jmurphyau / gax-plugin-directories.md
Created April 18, 2018 02:42
Where to put files to install plugins in Genesys Administrator Extensions (GAX)

GAX Plugin Directories

The paths to install GAX plugins can be found below

Windows

  • [gax-root]\plug-ins
  • [gax-root]\webapp\WEB-INF\lib

Linux

@jmurphyau
jmurphyau / gax-upload-ip.md
Created April 18, 2018 03:37
GAX Upload IP

GAX Upload IP

Command

Syntax:

java -jar gaxclc.jar -u:[username] -p:[password] -h:[gax-host]:[gax-port] ip add [install-package]

Example:

@jmurphyau
jmurphyau / f5-bgp-info.md
Last active April 23, 2018 07:06
F5 BGP Info
@jmurphyau
jmurphyau / copy-wde-logs-to-desktop.cmd
Created April 24, 2018 00:16
one liner to copy WDE logs from default WDE log directory to the desktop
powershell.exe -command "& { $dt=(get-date -UFormat \"%Y-%m-%d-%H%m%S\"); $s=\"$Env:APPDATA\Genesys Telecommunication\InteractionWorkspace\log\*\"; $d=(\"{0}\Desktop\wde-logs-{1}\" -f ($Env:USERPROFILE,$dt)); if ((test-path $d) -eq $false) { md $d > $null; } cp $s $d; write-host \"\"; write-host (\"WDE logs have been copied to {0}\" -f $d) }"