Skip to content

Instantly share code, notes, and snippets.

Andrew Smith silentworks

Block or report user

Report or block silentworks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
silentworks /
Created Jan 8, 2019 — forked from taniarascia/
Basic CRUD operations with PDO and MySQL

Basic CRUD operations with PDO

CRUD = Create, Read, Update, Delete

Open a database connection

$host = '';
$dbname = 'test';
$username = 'root';
View example.html
<div class="question-set">
{#if question}
on:answer="{({ detail }) => checkAnswer(detail.option)}"
on:next="{({ detail }) => onToNext(detail.question)}"
<Feedback questions="{questions}" totalPoints="3" />
silentworks /
Created Nov 14, 2018 — forked from zulhfreelancer/
How to install Flynn on single host (single-node mode)?

$ sudo bash -c "$(curl -s"

silentworks /
Created Nov 14, 2018 — forked from eduwass/
Flynn Install : Single node ( for Ubuntu 14.04 x64 @ DigitalOcean droplet )
# This script will automatically set up a single node Flynn Cluster on your linux box
# Fresh Flynn install with domain provided by the service
# Tested with Base Image: Ubuntu 14.04 x64 @ DigitalOcean droplet
# @date 16 Nov 2015
# @author Edu Wass (eduwass at gmail com)
echo '---- START SETUP ----'
silentworks /
Created Jun 2, 2018 — forked from barbietunnie/
Stop Default Apache server running on Mac OS Sierra
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
silentworks / server.js
Created May 28, 2018 — forked from rob-balfre/server.js
Example of Sapper using Passport
View server.js
import express from 'express';
import passport from 'passport';
import {Strategy} from 'passport-github';
import compression from 'compression';
import sapper from 'sapper';
import serve from 'serve-static';
import {routes} from './manifest/server.js';
import App from './App.html';
import _ from '../SECRETS';
silentworks / app.js
Created May 15, 2018 — forked from joshuataylor/app.js
Preact component to notify user when a change has been made, and on route change reload the page.
View app.js
import { h, Component } from 'preact';
import { Router } from 'preact-router';
import Header from './header';
import Home from '../routes/home';
import Profile from '../routes/profile';
import NotifyChange from "./NotifyChange/index";
// import Home from 'async!../routes/home';
// import Profile from 'async!../routes/profile';
View InfiniteScroll.js
(function($, window, undefined) {
var InfiniteScroll = function() {
this.initialize = function() {
this.setupEvents = function() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
silentworks /
Created May 1, 2018 — forked from afgane/
An Ansible playbook for setting up a host to run Ansible itself.

Create an inventory file such called hosts with the following content (adjusting the IP address)

[ansible-hosts] ansible_ssh_private_key_file=key_pair.pem ansible_ssh_user=ubuntu  # Ubuntu target

From an Ansible-enabled machine, download playbook.yml and run it with

You can’t perform that action at this time.