Skip to content

Instantly share code, notes, and snippets.

View simov's full-sized avatar

simo simov

View GitHub Profile
@RexSkz
RexSkz / prism-javascript.js
Last active February 8, 2022 04:07
JavaScript file highlight for Prism.js (support function arguments)
// The prism.js library has already supported identifying function arguments according to:
// https://github.com/PrismJS/prism/pull/1446
// https://github.com/PrismJS/prism/pull/1722
// Please use the latest version instead.
@shortjared
shortjared / list.txt
Last active April 28, 2024 07:20
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@atrauzzi
atrauzzi / deploy.sh
Last active July 9, 2020 08:06
🖋 Azure App Service deployment using bash and CURL
#!/bin/bash
NAME="some-convention-driven-name-usually-a-resource-group"
APP="your-app-name-ideally-another-convention"
DEPLOYMENT_PASSWORD=`az appservice web deployment list-site-credentials \
--resource-group ${NAME} \
--name ${APP} \
--query publishingPassword \
--output tsv`
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@soarez
soarez / ca.md
Last active May 3, 2024 00:04
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@niravmehta
niravmehta / kue_cleanup.js
Created July 30, 2013 11:57
Cleanup script for Kue job queueing system in Node.js. Deletes failed, active and completed jobs after specified time. Can run on command line directly with "node kue_cleanup". Requires Kue installed :-)
var kue = require('kue'),
jobs = kue.createQueue(),
util = require('util'),
noop = function() {};
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes
// Twitter Issue (Can't tweet exclamation mark with v1.1)
// https://dev.twitter.com/discussions/12378
// https://github.com/mikeal/request/issues/578
var escape = function(str) {
return encodeURIComponent(str).replace(/[!*()']/g, function(character) {
return '%' + character.charCodeAt(0).toString(16);
});
};
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@leeoniya
leeoniya / stable-sort-test.js
Created June 19, 2013 18:09
test if js engine's Array#sort implementation is stable
// test if js engine's Array#sort implementation is stable
var str = "abcdefghijklmnopqrstuvwxyz";
str.split("").sort(function(a,b) {
return ~~(str.indexOf(b)/2.3) - ~~(str.indexOf(a)/2.3);
}).join("") == "xyzvwtursopqmnklhijfgdeabc";