Skip to content

Instantly share code, notes, and snippets.

View example-1.yml
# .github/workflows/example-1.yml
name: My First Manual Workflow
on: [workflow_dispatch]
jobs:
example:
name: Example Job
runs-on: ubuntu-latest
steps:
- name: Clone Repository
View waxSpec.json
[{
"userId": "",
"email": "",
"pin": "",
"recordList": [
{
"type": "discogs",
"id": "<discogs_id>"
},
@adammcarth
adammcarth / homepage.marko
Created Nov 27, 2015
Potential navigation bar component in Marko JS
View homepage.marko
<!-- /src/pages/homepage/homepage.marko -->
<layout-use template="../../layouts/layout.marko" navbar-current="home">
<layout-put into="body">
...
</layout-put>
</layout-use>
View route_tests.js
module.exports = function(server) {
var request = require("supertest");
it("[GET] /", function(done) {
request(server).get("/").expect(200, done);
});
it("[GET] /posts", function(done) {
request(server).get("/posts").expect(200, done);
});
View config.yaml
apache:
install: '1'
settings:
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
View gulpfile.js
gulp.task("concat:js", function() {
// Loop through each JS collection and run a seperate concat task
Object.keys(collections.js).forEach(function(name) {
gulp.src(collections.js[name])
.pipe(concatJS("collections/" + name + ".js"))
.pipe(gulp.dest(paths.dest.javascript));
});
});
View Gulpfile.js
var gulp = require("gulp");
var collections = require("./collections");
gulp.task("concat-css", function() {
Object.keys(collections).forEach(function(name) {
gulp.src(collections[name])
.pipe(plugins.concatCSS("collections/" + name + ".css"))
.pipe(gulp.dest("assets/stylesheets"));
});
});
View gist:f5bb5e900369879a9d24
# Save the answer into a variable called 'num'.
num = input("How many underscores do you want, yo?: ")
# Multiply "_" by the amount specified before...
underscores = "_" * int(num)
# Print out the smiley face!
print("^" + underscores + "^")
@adammcarth
adammcarth / deploy.sh
Created Feb 20, 2015
Deploys code from a GitHub repository to an ec2 instance (or any linux-based VPS).
View deploy.sh
#!/usr/bin/env bash
source ~/.rvm/scripts/rvm
rvm use
#`deploy.sh` v0.0.1 by Adam McArthur.
# Deploys code from a GitHub repository to an ec2 instance.
# It is reccommended that the current user can use "sudo" without a password [you might need to use sudo from inside this script],
# See: http://askubuntu.com/questions/235084/how-do-i-remove-ubuntus-password-requirement#answer-235088
##### SETTINGS [Change Me] #####
View gist:8c0f19001df60149aeb8
#!/usr/bin/env sh
source ~/.rvm/scripts/rvm
rvm use 2.2.0
app_name="App"
apps_dir="/var/www"
github_username="adammcarth"
git_repo="filthy_parrot"
app_install_commands="bundle install"