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
| docker stop $(docker ps -a -q); docker rm $(docker ps -a -q); docker volume rm $(docker volume ls -qf dangling=true) |
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 mongoose from 'mongoose' | |
| import schema from './schema' | |
| const User = (namespace) => { | |
| const db = mongoose.connection.useDb(namespace, { useCache: true }) | |
| // Add any schema plugins here | |
| return db.model('user', schema) | |
| } | |
| async function get(req, res) { |
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
| FROM node:8.15-alpine | |
| ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.5.0/wait /wait | |
| RUN chmod +x /wait | |
| RUN mkdir -p /src/app | |
| WORKDIR /src/app | |
| COPY package.json /src/package.json | |
| COPY .npmrc /src/.npmrc | |
| RUN npm install |
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
| version: "3" | |
| services: | |
| app: | |
| container_name: this-app | |
| restart: always | |
| build: ../path-to-this-app/ | |
| volumes: | |
| - .:/src/app | |
| - /src/app/node_modules |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| 'use strict'; | |
| angular.module('myApp').directive('numbersOnly', function () { | |
| return { | |
| restrict: 'A', | |
| require: 'ngModel', | |
| scope: { | |
| options: '=numbersOnly' | |
| }, | |
| link: function (scope, element, attrs, ngModel) { |
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
| "scripts": { | |
| "start": "node node_modules/react-native/local-cli/cli.js start", | |
| "rc-start": "npm start -- --reset-cache", | |
| "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean", | |
| "clean-start": "npm run clean && npm run rc-start", | |
| "fresh-install": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build/ModuleCache/* && rm -rf node_modules/ && npm cache clean && npm install", | |
| "fresh-start" : "npm run fresh-install && npm run rc-start", | |
| "tron": "node_modules/.bin/reactotron" | |
| } |
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
| $.ajax({ | |
| type: "GET", | |
| dataType: "jsonp", | |
| cache: false, | |
| url: "https://api.instagram.com/v1/users/140572/media/recent/?access_token=6277169.76495e2.ac7aa5ca54094298b10f8b6a527a9ec3", // Get user images | |
| // Get user iD - http://instagram-uid.herokuapp.com/ | |
| // "https://api.instagram.com/v1/tags/catwalk/media/recent?client_id=6277169&access_token=6277169.76495e2.ac7aa5ca54094298b10f8b6a527a9ec3", // Get Tagged images | |
| success: function(data) { | |
| for (var i = 0; i < 9; i++) { | |
| $("#instagram").append("<li><a target='_blank' rel='lightbox' href='" + data.data[i].images.standard_resolution.url + "'><img src='" + data.data[i].images.low_resolution.url +"'></img></a></li>"); |
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
| $.fn.exists = function () { | |
| return this.length !== 0; | |
| } | |
| // usage | |
| $('.my-item').exists(); |
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
| // Switch img src for large displays | |
| $('.rs-img').each(function() { | |
| var baseWidth = 1140; | |
| // get current width | |
| var lgeScrn = $(window).innerWidth(); | |
| // activate if width is less than base width |
NewerOlder