Skip to content

Instantly share code, notes, and snippets.


Nick Saponaro 99darwin

View GitHub Profile
99darwin / build.gradle
Last active Jun 4, 2020
View build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
repositories {
99darwin / divid-api.js
Last active Jun 26, 2019
Divid api example for node-rpc-tutorial
View divid-api.js
const RpcClient = require('divid-rpc')
const config = require('./config')
module.exports = app => {
const rpc = new RpcClient(config.config)
app.get('/blockcount', (req, res) => {
rpc.getBlockCount((err, response) => {
if (err) {
99darwin / index.js
Last active Jun 26, 2019
Simple server for node-rpc-tutorial
View index.js
const express = require('express')
const bodyParser = require('body-parser')
const path = require('path')
const app = express()
const port = process.env.PORT || 1337
app.use(bodyParser.urlencoded({ extended: true }))
99darwin / cognito-to-ddb-test.json
Created Jun 12, 2019
Test request for Cognito to DynamoDB Lambda Function
View cognito-to-ddb-test.json
"userName": "johnnysmith",
"request": {
"userAttributes": {
"email": "",
"email_verified": true,
"name": "Johnny Smith",
"sub": "abcdevfefe-1232132-cofeve"
99darwin / cognito-to-ddb.js
Last active Jun 12, 2019
Add new Amazon Cognito users to DynamoDB with Lambda
View cognito-to-ddb.js
var aws = require('aws-sdk');
var ddb = new aws.DynamoDB({apiVersion: '2012-10-08'});
exports.handler = async (event, context) => {
let date = new Date();
const tableName = process.env.TABLE_NAME;
const region = process.env.REGION;
99darwin /
Created Apr 22, 2019
Increase max upload size for WordPress site manually


You may want to increase the max upload size on your WordPress installation in order to upload a custom theme or larger media files.

Note: This will not work on shared hosting plans. This workaround is only for self-hosted WordPress installations.

How to

From your server, access the php.ini file under your PHP installation directory.

sudo nano /etc/php/<php_version>/apache2/php.ini
99darwin /
Last active Apr 19, 2019
Setting up a WordPress site on Digital Ocean from A-Z


This guide assumes that you already have some of the basics handled.

  1. A Digital Ocean account
  2. A Droplet running Ubuntu 18.04 deployed (but not set up)
  3. A domain (optional)
  4. Basic understanding of SSH
  5. Basic understanding of nano

NOTE: all items marked in bold are boilerplate and should be replaced with your own values.

99darwin / server.js
Created Mar 14, 2019
Express handlebars server with MongoDB
View server.js
const express = require('express')
const mongoose = require('mongoose')
const exphbs = require('express-handlebars')
const bodyParser= require('body-parser')
const path = require('path')
const PORT = process.env.PORT || 1279
const app = express()
99darwin /
Created Jan 11, 2019
Deploy Meteor App with MUP and Migrate Local MongoDB to Remote Server

Deploy Meteor app and migrate the built-in, local MongoDB to a remote server where the app is hosted.

It took me days to actually get this working, so I figured I would write out the steps I took to finally resolve the issue for my own assistance in the future and, hopefully, to help others who encounter this problem.

Create .deploy folder in your app's directory

cd .deploy
mup init

Configure the mup.js file to match your configuration. Here's an extremely basic example:

99darwin / custom-slack.css
Last active Aug 4, 2018
Custom dark theme for slack
View custom-slack.css
body { background: ##2f3136; color: #dcddde; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }