Skip to content

Instantly share code, notes, and snippets.

View trepidity's full-sized avatar

Jared Jennings trepidity

View GitHub Profile
@trepidity
trepidity / autotas_delete_entity.xml
Created April 6, 2018 14:22
Example of a SOAP call to delete a Entity from Autotask API
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AutotaskIntegrations xmlns="http://autotask.net/ATWS/v1_5/">
<PartnerID>
</PartnerID>
<IntegrationCode>
</IntegrationCode>
</AutotaskIntegrations>
</soap:Header>
eDirectory sudo commands (If IDP)
* /opt/novell/eDirectory/bin
* /etc/init.d/ndsd
NAM sudo commands
* /etc/init.d/ndsd
- service commands
* novell-ac
* novell-idp
@trepidity
trepidity / play_audio_example.js
Created September 25, 2017 16:58
Example of calling React Native Sound
function playMedia(media) {
alert(media);
const sound = new Sound(media, (error) => {
if (error) {
console.log(error);
} else {
console.log('Playing sound');
console.log(`Duration in seconds: ${sound.getDuration()}`);
// Get the current playback point in seconds
sound.getCurrentTime(seconds => console.log(`at ${seconds}`));
@trepidity
trepidity / test_ciphers.sh
Created September 12, 2017 19:41
Test the different ciphers that a server supports.
#!/usr/bin/env bash
# OpenSSL requires the port number.
SERVER=10.10.1.7:1080
DELAY=1
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g')
echo Obtaining cipher list from $(openssl version).
for cipher in ${ciphers[@]}
class SongApi {
static getAllSongs() {
return fetch('http://wellspring-fellowship.github.io/site.json').then(response => {
return response.json();
}).catch(error => {
return error;
});
}
}
import * as types from './actionTypes';
import songApi from '../api/songApi';
export function loadSongsSuccess(songs) {
return {type: 'LOAD_SONGS_SUCCESS', songs};
}
export function loadSongs() {
return function(dispatch) {
@trepidity
trepidity / Messages.js
Created December 28, 2016 22:24
Parsing a json object in React
const dataW = [
{
"id": "1",
"type": "messages",
"attributes": {
"body": "Example Message 1",
"updated-at": "2016-12-28T18:32:50.176Z"
}
}
]
@trepidity
trepidity / log4j.properties
Created September 12, 2016 15:08
SailPoint log4j.properties file.
#
# (c) Copyright 2011 SailPoint Technologies, Inc., All Rights Reserved.
#
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %5p %t %c{4}:%L - %m%n
# this one is better for concurrency tests
@trepidity
trepidity / gist:5821244c6a8a2c4d97a6a0d94b5269dd
Last active December 26, 2022 05:15
Create User in LDAP
using System;
using System.DirectoryServices;
using System.DirectoryServices.Protocols;
using System.Security.Cryptography.X509Certificates;
using System.Net;
using System.Collections;
namespace BulkCreate
{
public class CreateUsers
https://frank-api-dev-pr-11.herokuapp.com/entries
JSON DATA
{ "data":
{ "type": "entries",
"relationships": {
"profile":
{ "data":
{ "type": "profiles", "id": "1" }
}