Skip to content

Instantly share code, notes, and snippets.

Jayson Harshbarger Hypercubed

Block or report user

Report or block Hypercubed

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
View .gitignore
-/
node_modules/
package-lock.json
View .gitignore
-/
node_modules/
package-lock.json
View .gitignore
-/
node_modules/
package-lock.json
View airdrop.config.js
module.exports = {
"package_path": "./-/",
"package_root": "/-/"
}
@Hypercubed
Hypercubed / README.md
Last active Apr 2, 2019
DocPad: rsync Deploy Script
View README.md

DocPad: rsync Deploy Script

  • Place deploy.sh in {docpad folder}/bin/
  • Create (or edit) a .env file in your docpad folder with the following values:
#!/bin/bash
DEPLOY_SOURCE_DIR="out/"
DEPLOY_DEST_DIR="~/public_html/"
DEPLOY_SERVER=deploy-server-name
View plugin.service.ts
import { Injectable, Injector, Compiler } from '@angular/core';
import { SettingsService } from './settings.service';
@Injectable({
providedIn: 'root'
})
export class PluginsService {
constructor(
private settings: SettingsService,
View .gitignore
node_modules
package-lock.json
@Hypercubed
Hypercubed / tvl.ts
Created Dec 23, 2017
Three-valued logic (TS)
View tvl.ts
export type bool = boolean | null;
export type cmpValue = -1 | 0 | 1;
export function not(a: bool) {
if (a === true) return false;
if (a === false) return true;
return null;
}
export function and(lhs: bool, rhs: bool): bool {
@Hypercubed
Hypercubed / Gruntfile.js
Last active Dec 7, 2017
DocPad is great.... but so is Grunt. Use grunt-contrib-connect and grunt-contrib-watch instead of docpad's server and watcher.
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
docpad: {
files: [ "./src/**/*.*" ],
out: ["out"]
},
watch: {
You can’t perform that action at this time.