Skip to content

Instantly share code, notes, and snippets.

View trepidity's full-sized avatar

Jared Jennings trepidity

  • https://www.novacoast.com
  • http://en.gravatar.com/jaredljennings
View GitHub Profile
@trepidity
trepidity / .zshrc
Last active November 9, 2020 12:44
my zsh RC file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/jjennings/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
#ZSH_THEME="robbyrussell"
@trepidity
trepidity / _loadResourcesAsync.js
Created April 16, 2018 13:38
Parsing error: Unexpected token = (at line 1)
_loadResourcesAsync = async () => {
return Promise.all([
Asset.loadAsync([
require('./assets/images/robot-dev.png'),
require('./assets/images/robot-prod.png'),
]),
Font.loadAsync({
// This is the font that we are using for our tab bar
...Ionicons.font,
// We include SpaceMono because we use it in HomeScreen.js. Feel free
@trepidity
trepidity / Example Card native-base
Created April 14, 2018 16:10
An example of a card with a list using native-base
<Container>
<Content>
<Card>
<CardItem cardBody>
<Image source={{uri: 'https://images.unsplash.com/photo-1445052520430-32c8ebc92fe3?crop=entropy&dpr=2&fit=crop&fm=jpg&h=825&ixjsv=2.1.0&ixlib=rb-0.3.5&q=50&w=1450'}} style={{height: 200, width: null, flex: 1}}/>
</CardItem>
<CardItem>
<Title>{user.firstName + " " + user.lastName}</Title>
</CardItem>
<CardItem>
@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"
}
}
]