Skip to content

Instantly share code, notes, and snippets.

@chrisjhoughton
chrisjhoughton / README.md
Last active May 19, 2023 04:36
Notify tray workflows "webhook style" from Salesforce using Apex triggers.

Salesforce Apex trigger notifications for tray.io

Salesforce's Apex triggers allow you to trigger tray workflows in real-time, based on events that occur in Salesforce. Events include things like:

  • New lead creations
  • Opportunity updates, such as the status moving from "open" to "closed"

Salesforce doesn't support webhooks out of the box, so we'll need to add some Apex code to your Salesforce account to notify tray at the right time.

@alces
alces / ansible_local_playbooks.md
Last active April 5, 2024 18:28
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="select2.js"></script>
<script>
$(function(){
// display logs
function log(text) {
@tonysneed
tonysneed / Mac OS X: Open in Visual Studio Code
Last active March 27, 2024 10:02
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@abhishek77in
abhishek77in / install_ruby_rpi.sh
Created April 11, 2016 18:48 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.3 on the Raspberry Pi (Raspbian)
#!/bin/bash
# -----------------------------------------------------------------------
# Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s raw_script_url_here)
# -----------------------------------------------------------------------
# Set up variables
@p0deje
p0deje / jenkins_restart_dead_executors.groovy
Last active August 10, 2018 07:30
Restart all dead executros on Jenkins (use from Script Console)
def deadExecutors = Jenkins.instance.computers.collect { c ->
c.executors.findAll { !it.isActive() }
}.flatten()
deadExecutors.each { it.doYank() }
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@BakermanLP
BakermanLP / iwscan_csv.pl
Created March 18, 2016 13:27
iwlist scanning to csv
#!/usr/bin/perl
use POSIX;
$_ = `iwlist wlan0 scanning`;
$n = 0;
for $match (split(/(?=Cell)/)) {
# print "\nCell #######################################\n";
my @lines = split /\n/,$match;
$essid="";
@penguinpowernz
penguinpowernz / nwinfo.rb
Created February 28, 2016 03:33
Ruby network interface information parser
#!/usr/bin/env ruby
require 'json'
ifaces = []
whitelist = [ "eth", "wlan", "en" ]
names = `ip link sh`.scan(/^\d+: (.*):/).flatten.select do |name|
whitelist.any? {|pattern| name.start_with?(pattern) }
end
@tuatara
tuatara / admin.py
Last active April 7, 2021 21:23
Allow case-insensitive usernames with Django & Postgres
# Add the mixin to the default admin objects
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin as ContribUserAdmin
from django.contrib.auth.forms import UserChangeForm as ContribUserChangeForm, \
UserCreationForm as ContribUserCreationForm
from accounts.forms import CaseInsensitiveUsernameMixin # adjust if forms.py is not in `accounts` app
class UserChangeForm(CaseInsensitiveUsernameMixin, ContribUserChangeForm):