Skip to content

Instantly share code, notes, and snippets.

@derekedelaney
derekedelaney / .drive_global_blacklist.filter
Created December 2, 2019 20:16
A blacklist for Synology folders and files.
[Version]
major = 1
minor = 1
[Common]
@firatkucuk
firatkucuk / delete-slack-messages.js
Last active May 1, 2024 04:17
Deletes slack public/private channel messages, private chat messages and channel thread replies.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = 'SLACK TOKEN';
// Legacy tokens are no more supported.
// Please create an app or use an existing Slack App
@jamesbar2
jamesbar2 / postal-codes.json
Last active April 30, 2024 16:15 — forked from matthewbednarski/postal-codes.json
Global postal codes regex formats
[{
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup",
"Country": "Afghanistan",
"ISO": "AF",
"Format": "NNNN",
"Regex": "^\\d{4}$"
}, {
"Note": "With Finland, first two numbers are 22.",
"Country": "Åland Islands",
"ISO": "AX",
@delemach
delemach / slackNotify.js
Last active November 1, 2018 18:41 — forked from turret-io/slackNotify.js
Parse SNS notification from Elastic Beanstalk and publish to Slack channel
var http = require('https');
var querystring = require('querystring');
// set the post request options
var reqOptions = {
hostname: 'hooks.slack.com',
port: 443,
path: '/services/YOUR/SLACK/HOOK_HERE',
method: 'POST'
};
@moskinson
moskinson / tomcat-session-manager.config
Created January 13, 2014 12:10
Copy AWS Dynamo DB session storage in to tomcat installation lib, and replace the context.xml
container_commands:
01-copy-aws-library:
command: "cp WEB-INF/.ebextensions/AmazonDynamoDBSessionManagerForTomcat-1.0.1.jar.jar /usr/share/tomcat7/lib/"
02-replace-tomcat-context:
command: "cp WEB-INF/.ebextensions/context.xml /etc/tomcat7/context.xml"