Skip to content

Instantly share code, notes, and snippets.

View JamesTheHacker's full-sized avatar

0xDEADBEEF JamesTheHacker

  • United Kingdom
View GitHub Profile
module.exports = {
apps: [
{
name: 'API',
script: 'server.js',
env: {
APP_SECRET: process.env.APP_SECRET
},
env_production: {
NODE_ENV: 'production'
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "gbarbieru/xenial"
config.vm.network "private_network", ip: "192.168.1.2"
config.vm.synced_folder "./data", "/vagrant_data"
# Copy keys
config.vm.provision "file", source: "./keys/github.pub", destination: "/tmp/github.pub"
@JamesTheHacker
JamesTheHacker / provision.sh
Last active December 2, 2018 22:24
A bash script to provision a small node server
#!/bin/bash
UNPRIVILAGED_USER=roger_the_dodger
CERTBOT_EMAIL=your@email.here
APP_DIR=$UNPRIVILAGED_USER_HOME/api
PM2=$APP_DIR/node_modules/pm2/bin/pm2
UNPRIVILAGED_USER_HOME=/home/$UNPRIVILAGED_USER
NODE_VERSION=https://deb.nodesource.com/setup_10.x
# Update before downloading Node install script
server 🦄 ssh -t dev 'bash -s' < scripts/provision.sh
Pseudo-terminal will not be allocated because stdin is not a terminal.
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
server 🦄 npm run api:provision-dev
> server@1.0.0 api:provision-dev /Users/spongebob/Projects/fb-app/server
> ssh -tt dev 'bash -s' < scripts/provision.sh
dev@192.168.0.17's password:
#!/bin/bash
# Download NodeJS installation script
#!/bin/bash
# Download NodeJS installation script
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
# Install required packages
sudo apt-get update
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install -y \
@JamesTheHacker
JamesTheHacker / script.js
Created May 8, 2018 09:53
Facebook Group Scraper with Tampermonkey and JavaScript
// ==UserScript==
// @name Facebook Group Scraper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author James Jeffery <jamesjefferyuk@protonmail.com>
// @match https://www.facebook.com/search/str/*/keywords_groups
// @grant GM_setClipboard
// ==/UserScript==
import React, { Component } from 'react'
import { Meteor } from 'meteor/meteor';
import PropTypes from 'prop-types'
class FacebookLoginButton extends Component {
static propTypes = {
label: PropTypes.string,
onError: PropTypes.func,
onSuccess: PropTypes.func,
permissions: PropTypes.array,
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/mixins";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/grid";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/responsive-utilities";
.row {
@include make-row();
}
#content {
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}"
}