Skip to content

Instantly share code, notes, and snippets.

View copleykj's full-sized avatar
😎
Totally Committed

Kelly Copley copleykj

😎
Totally Committed
View GitHub Profile
name: Deploy
on:
push:
branches:
- master
jobs:
test:
name: Tests
runs-on: ubuntu-latest
@CaptainN
CaptainN / Meteor Hooks Kitchen Sink.jsx
Last active January 1, 2021 21:52
Meteor Hooks Kitchen Sink
import { useTracker } from 'meteor/react-meteor-data'
// Create a reusable subscribe hook
const usePageSubscription = (pageId) => useTracker(() => {
const subscription = Meteor.subscribe('page', pageId)
return !subscription.ready()
}, [pageId])
// Separate page hook
const usePage = (pageId) => useTracker(() => {
@movitto
movitto / xrptipbot.vue
Last active July 25, 2019 04:30
Embedding xrptipbot in a vuejs application
// VueJS does not permit <script> tags to be embedded in component templates
// Inorder to embed the xrptipbot widget (as described here: https://www.xrptipbot.com/account/embed):
// Add the following to your vuejs component template (make sure to change the tip receipient!):
<div id="xrptipbot">
<a amount="5.00" size="175" to="DevNullProd" network="twitter" href="https://www.xrptipbot.com" target="_blank"></a>
</div>
// Then add / extend the component 'mounted' hook to add the script:
mounted : function(){
@WietseWind
WietseWind / label-color.js
Created March 8, 2019 11:59
Generate Meetup labels
const username = process.argv[2]
const type = process.argv[3] || 1
const sharp = require('sharp')
const QRCode = require('qrcode')
const fetch = require('node-fetch')
const printer = require("node-printer-lp-complete")
const printOptions = {
media: 'Custom.25x50mm',
destination: "ColorLabelPrinter",
@StorytellerCZ
StorytellerCZ / meteor-socialize-dev
Last active July 16, 2017 17:32
Basic setup for Meteor Socialize development
#!/bin/sh
# create bare Meteor app
meteor create socialize-dev --bare
cd socialize-dev
# create packages folder
mkdir packages
cd packages
# clone all the socialize packages on dev
@solace
solace / extend-email-send.md
Last active November 20, 2020 06:58
Meteor: Extend default Email.send invocation

Use a non-SMTP mail method in Meteor

Requirements:

  • lodash (or underscore, you may need to change your _ functions to suit)
  • Meteor email package
Meteor.startup(function () {
 var sendEmail = _.bind(Email.send, Email);
@digilord
digilord / gist:d9bfcb473cc3cef673f4
Created June 25, 2014 19:48
Block Helper Example
<template name='testing'>
{{#myOuterBlockHelper mydata='SOMETHING'}}
{{#myInnerBlockHelper1}}helper 1!{{/myInnerBlockHelper1}}
{{else}}
<h1> Some static Content </h1>
{{/myOuterBlockHelper}}
@eholk
eholk / morse.js
Last active November 8, 2020 20:46
A Morse Code generator in Java Script
// Copyright 2014–2017, Eric Holk
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
# Do we have swap?
grep swap /etc/fstab -q
status=$?
if [ $status -ne 0 ]; then
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
echo "/swapfile none swap sw 0 0" >> /etc/fstab
swapon /swapfile
fi