This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# shows the lyrics for the currently playing song on Spotify | |
artist=$(spotifycli --artist) | |
song=$(spotifycli --song | cut -f1 -d"-" | cut -f1 -d"(") | |
echo "artist: $artist" | |
echo "song: $song" | |
glyrics "$song $artist" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Individual Contributor License Agreement | |
Thank you for your interest in the project, owned by Monomax Software (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose. | |
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all ri |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webshot = require('webshot'); | |
var maxSlideNumber = 17 | |
var opt = { windowSize: { width: 1440 | |
, height: 799 }}; | |
webshot('https://sungwoncho.github.io/presentations/20170727-graphdb-node-stackoverflow.html#/', 'slide0.png', opt, function(err) { | |
if (err) { | |
console.log(err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculate RemoteScore in https://remotebase.io | |
* | |
* Currently all RemoteScores are computed in the browser using JavaScript. | |
* In the future, this logic might be brought to the server-side so that the public API can query it. | |
* | |
* Note: RemoteBase public API - https://remotebase.github.io/remotebase-api/ | |
*/ | |
const remoteScoreWeights = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
not_supported() { | |
echo "OS not supported: ${UNAME}" | |
echo "Please compile manually from https://github.com/dnote-io/cli" | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bootstrap a fresh instance running Ubuntu 16.04 | |
sudo apt-get update | |
sudo apt-get install -y zsh | |
sudo apt-get install -y nginx | |
sudo apt-get install -y tmux | |
sudo apt-get install -y postgresql postgresql-contrib | |
# nginx stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { Router, browserHistory } from 'react-router'; | |
import { Provider } from 'react-redux'; | |
import ReactGA from 'react-ga'; | |
import getRoutes from './routes'; | |
import ApiClient from './libs/api_client'; | |
import configureStore from './configureStore'; | |
import { ReduxAsyncConnect } from 'redux-connect'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Store the filenames of previous build | |
PREVIOUS_BUILD=(./static/dist/*) | |
function fetch { | |
echo "###### Fetching..." | |
git pull origin prod | |
git checkout prod | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login(req, res) { | |
const { username, shaHash } = req.body; | |
res.setHeader('Content-Type', 'application/json'); | |
User.findOne({ username, verified: true }, (err, user) => { | |
if (!user) { | |
console.log('No user with that username found or not verified'); | |
res.status(500); | |
res.end(); | |
return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function sendJobAlertEmail() { | |
console.log('CRON: sending alert email'); | |
function handleJobs(jobs, user, notifiableJobs, done) { | |
each(jobs, (job, n) => { | |
Notification.count({ jobId: job._id, userId: user._id }, (err, count) => { | |
if (count > 0) { | |
console.log('notificaiton already sent'); | |
return n(); | |
} |
NewerOlder