Skip to content

Instantly share code, notes, and snippets.

View nickdandakis's full-sized avatar
🙏
These hands make digital projects finish.

Nick Dandakis nickdandakis

🙏
These hands make digital projects finish.
View GitHub Profile
@nickdandakis
nickdandakis / yeet.js
Last active November 21, 2015 18:57
UrbanDictionary Word Of The Day + Giphy GIF
// npm install request and cheerio, if these aren't working
var request = require('request');
var cheerio = require('cheerio');
var sendGIFToClient = function(url) {
// TODO
console.log(url);
};
var sendWordToClient = function(word, definition, example) {
@nickdandakis
nickdandakis / botkit-simple.js
Last active July 5, 2016 20:18
Basic Botkit scaffolding for Slack slash commands with Mongo support
var Botkit = require('botkit');
if(!process.env.SLACK_CLIENT_ID ||
!process.env.SLACK_CLIENT_SECRET ||
!process.env.SLACK_VERIFICATION_TOKEN) {
console.log('Error: Specify SLACK_CLIENT_ID, SLACK_CLIENT_SECRET and SLACK_VERIFICATION_TOKEN in environment');
process.exit(1);
}
var config = {}
@nickdandakis
nickdandakis / keybase.md
Created September 13, 2016 17:27
Keybase proof

Keybase proof

I hereby claim:

  • I am nickdandakis on github.
  • I am nickdandakis (https://keybase.io/nickdandakis) on keybase.
  • I have a public key ASDsszdCc7d-7Z9eHD1Tray5BYLKFyKF3BdKtTYem7Adsgo

To claim this, I am signing this object:

@nickdandakis
nickdandakis / DigitalSuede.md
Last active September 26, 2016 14:46
Digital Suede w/Pixi
@nickdandakis
nickdandakis / Dockerfile
Created October 14, 2017 17:52
Basic Dockerfile for Node applications
FROM node:alpine
# Create app directory
RUN mkdir -p /usr/src
WORKDIR /usr/src
# Install app dependencies
COPY package.json /usr/src/
COPY package-lock.json /usr/src/
RUN npm install
@nickdandakis
nickdandakis / Dockerrun.aws.json
Last active October 16, 2017 13:58
Single Container Docker AWS Elastic Beanstalk deployment artifact
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "bestest-aws-org.dkr.ecr.us-east-1.amazonaws.com/token/this-web-scale:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "3000"
}
@nickdandakis
nickdandakis / WindowsWindowControls.jsx
Created March 16, 2018 23:10
Microsoft Windows window controls
import React, { Component } from 'react';
import _ from 'lodash';
import classnames from 'classnames';
import { remote } from 'electron';
class WindowsWindowControls extends Component {
state = {
fullscreen: false,
blur: false,
};
@nickdandakis
nickdandakis / MacOSWindowControls.jsx
Created March 16, 2018 23:10
Apple MacOS window controls
import React, { Component } from 'react';
import classnames from 'classnames';
const ALT = 18;
class MacOSWindowControls extends Component {
state = {
altKeyDown: false,
blurred: false,
fullscreen: false,
@nickdandakis
nickdandakis / package.json
Created October 14, 2017 18:21
Next.js + AWS Elastic Beanstalk + AWS EC2 Container Service + Docker package.json
{
"name": "this-web-scale",
"version": "x.x.x",
"scripts": {
"dev": "node server.js",
"build": "NODE_ENV=production next build",
"start": "NODE_ENV=production node server.js",
"dockerize": "npm run build:docker && npm run tag:docker && npm run push:docker && npm run tag-latest:docker && npm run push-latest:docker",
"deploy": "npm run deploy:staging",
"deploy:staging": "eb use token-staging && eb deploy --label v$npm_package_version --verbose",
@nickdandakis
nickdandakis / package.json
Last active April 11, 2019 10:44
Next.js + AWS Elastic Beanstalk + AWS EC2 Container Service + Docker package.json
{
"name": "this-web-scale",
"version": "0.0.1",
"scripts": {
"dev": "node server.js",
"build": "NODE_ENV=production next build",
"start": "NODE_ENV=production node server.js",
"dockerize": "npm run build:docker && npm run tag:docker && npm run push:docker && npm run tag-latest:docker && npm run push-latest:docker",
"deploy": "eb use this-web-scale-production && eb deploy --label v$npm_package_version --verbose",
"build:docker": "docker build -t $npm_package_config_docker_image:$npm_package_version -t $npm_package_config_docker_image:latest .",