Skip to content

Instantly share code, notes, and snippets.

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "How to find an apprenticeship?",
"acceptedAnswer": {
"@type": "Answer",
"text": "<p>We provide an official service to search through available apprenticeships. To get started, create an account here, specify the desired region, and your preferences. You will be able to search through all officially registered open apprenticeships.</p>"
var canvas = window.backgroundCanvas;
var doc = document;
function bgAnimate(){
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
if(canvas.getContext) {
<!-- This code reads images and gifs on clipboard paste
Use it for your rich text editors so your users can edit content fast -->
<script>
import { uploadFile } from 'yourApiLib';
const pasteImage = (evt) => {
Array.from(evt.clipboardData.files).forEach(async (file) => {
if (file.type.startsWith('image/') || file.type.startsWith('video/')) {
uploadFile(file);
}
@IharKrasnik
IharKrasnik / install_updated_packages.sh
Last active July 20, 2017 13:34
Bash script to be used as post-merge git hook to install NPM modules recursively only for changed package.json files (and package-lock.json files for npm > v5)
#!/bin/bash
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
PROJECT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) # script assumes that you placed it in the root of your project dir
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" # find all files changed by commit first
var child_process = require('child_process');
var packageJson = require('./package.json');
var requiredNodeVersion = packageJson.required_node_version;
var requiredNpmVersion = packageJson.required_npm_version;
var colors = {
green: "\x1b[32m",
red: "\x1b[31m",
}
{
"_id" : "123",
"name" : "Weekend Game",
"interval" : {
"from" : ISODate("2017-05-22T10:00:00.000Z"),
"to" : ISODate("2017-05-22T12:00:00.000Z")
},
"requiredParticipants" : 12,
"participants" : [
{
'use strict';
var kafka = require('golance-kafka-node');
var HighLevelConsumer = kafka.HighLevelConsumer;
var async = require('async');
var _ = require('lodash');
var events = require('events');
var util = require('util');
var Q = require('q');
var events = require('events');
var util = require('util');
var _ = require('underscore');
var Q = require('q');
var DEFAULTS = {
maxQueueSize: false //no limits
};
/**
var Q = require('q');
var domain = require('domain');
var http = require('http');
var util = require('util');
var appUtils = require('lib/utils/appUtils');
var _ = require('lodash');
module.exports.start = function (logger, consumer, inMemoryBus, registerHandlers, options) {
return new Worker(logger, consumer, inMemoryBus, registerHandlers, options);
};
<html ng-app="main"><head><style type="text/css">@charset "UTF-8";[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\:form{display:block;}</style>
<title ng-bind="pageTitle ? pageTitle : 'goLance'">Dashboard</title>
<meta charset="utf-8">
<meta property="og:title" content="goLance">
<meta property="og:site_name" content="goLance">
<meta property="og:image" content="https://res.cloudinary.com/golance/image/upload/v1455012811/logo-square_slnrua.png">
<meta property="og:description" content="goLance is an online platform where you will find the most skilled Freelancers from around the World . Dozens of Quality Programers, Designers, Developers, writers, etc.. are here to resolve all your Business needs.">
<meta property="description" content="goLance is an online platform where you will find the most skilled Freelancers from around the World . Dozens of Quality Programers, Designers, Developers, writers, etc.. are her