Skip to content

Instantly share code, notes, and snippets.

#generic routes
172.17.0.1    admin.localplugins.online
172.17.0.1    workflow.localplugins.online
172.17.0.1    appprocess.localplugins.online
172.17.0.1    formbuilder.localplugins.online
172.17.0.1    notifications.localplugins.online
172.17.0.1    autoemails.localplugins.online
172.17.0.1    breathehr.localplugins.online
172.17.0.1    jobstatus.localplugins.online
172.17.0.1    jobapprovalprocess.localplugins.online
@mindnuts
mindnuts / dnsmasq.conf
Last active June 15, 2021 10:08
generic dnsmasq config file
port=53
domain-needed
bogus-priv
strict-order
log-queries
server=/aws/10.0.0.2
address=/localvacancies.online/172.18.0.1
address=/localplugins.online/172.18.0.1
address=/localdevops.online/172.18.0.1
@mindnuts
mindnuts / README.md
Created November 3, 2020 05:00
Restart audio devices

create a text file

sudo touch /usr/local/bin/audio-restart

make it executable

sudo chmod +x /usr/local/bin/audio-restart

use the content of the file below and run it

@mindnuts
mindnuts / README.md
Last active April 17, 2020 13:36
Read Messages from Queue A and Write them to Queue B

======== To invoke use this:

npm install

AWS_PROFILE=prod AWS_REGION=eu-west-1 \
    DEAD_LETTER_QUEUE_URL=https://sqs.eu-west-1.amazonaws.com/1234567/dead_letter_prod_process_formbuilder_data \
    QUEUE_URL=https://sqs.eu-west-1.amazonaws.com/12345678/prod_process_formbuilder_data node send_message.js
#!/bin/bash
docker run -it -v $PWD:/home/jovyan --rm -p 8888:8888 alpine:3.6 jupyter notebook
1. https://frontend.task-manager-ewr.com/delay/getrecord/2
GET
Response:
[
{
"deliver_after": "1235549874",
"id": "3",
"payload": "{}",
"request_code": "SEND_MAIL",
"task_id": "None"
Jan 28 23:51:47 : com.orientechnologies.orient.core.sql.parser.TokenMgrError: Lexical error at line 1, column 40. Encountered: "\n" (10)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSqlTokenManager.getNextToken(OrientSqlTokenManager.java:6
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_scan_token(OrientSql.java:27385)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_3R_297(OrientSql.java:24151)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_3R_116(OrientSql.java:24182)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_3R_146(OrientSql.java:20884)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_3R_341(OrientSql.java:22005)
Jan 28 23:51:47 : at com.orientechnologies.orient.core.sql.parser.OrientSql.jj_3R_138(OrientSql.java:22189)
Jan 28 23:51:47 : at com.orientechnologi
@mindnuts
mindnuts / web-servers.md
Created June 19, 2017 09:39 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mindnuts
mindnuts / Reed.js
Last active May 17, 2017 13:02
Reed.co.uk API request Signature in NodeJS (https://www.reed.co.uk/developers/Recruiter#setting-Security), Tested with Node v6.9.2
/*
Inspired from the Perl example on the API documentation page
*/
const crypto = require('crypto');
const _ = require('lodash');
const api_key = '7e94901a-f6a2-4b97-a1df-0bafdeba3b99';
const character_array = api_key.split('');
const new_array = _.pullAt(character_array, [6,7,4,5,2,3,0,1,11,12,9,10,16,17,14,15,19,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35]);
@mindnuts
mindnuts / gist:205e8dd4338b407022e9011da3292cdc
Last active April 28, 2017 12:09 — forked from Pradnya-Paranjape/gist:147caeebe24fe2f8e05dced841b1908b
docker command to run activity migration

SQL command to create admin_settings table

CREATE TABLE `admin_settings` (
 `id` bigint(20) UNSIGNED NOT NULL,
 `record_id` varchar(255) NOT NULL,
 `name` varchar(255) DEFAULT NULL,
 `resource_id` varchar(255) NOT NULL,
 `black_box` blob,
 `created_date_time` datetime DEFAULT NULL,
 `modified_date_time` datetime DEFAULT NULL