1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv to manually rebuild the font cache
| import { ApolloServer, gql } from 'apollo-server-micro'; | |
| const typeDefs = gql` | |
| type Query { | |
| sayHello: String | |
| } | |
| `; | |
| const resolvers = { | |
| Query: { |
| #! /bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: dns-sync | |
| # Required-Start: | |
| # Required-Stop: | |
| # Default-Start: S | |
| # Default-Stop: | |
| # Short-Description: Synchronizes /etc/resolv.conf in WLS with Windows DNS - Matthias Brooks | |
| ### END INIT INFO |
| // @flow | |
| // V2 on NPM fixes notes below | |
| // https://github.com/Ephys/react-intl-formatted-xml-message | |
| // NOTE: Currently with this implementation, XML present in the variables you pass to FormattedMessageTag will also be converted to react components. | |
| // I'm working on a way to fix this issue. Right now I think that'll mean re-implementing FormattedMessage so the XML parsing part skips {variable} tags | |
| // TODO: | |
| // Replace all object or string values with placeholder tags |
| #!/bin/bash | |
| # Simple command to display the wireless strenght signal | |
| # | |
| clear | |
| while x=1 | |
| do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \ | |
| | grep CtlRSSI \ | |
| | sed -e 's/^.*://g' \ | |
| | xargs -I SIGNAL printf "\rWifi dBm: SIGNAL" | |
| sleep 0.5 |
| I've tested it on Fedora 23 and Ubuntu 16.04. I'm using gcc-5.3.1, python-3.4, VS Code-1.14.0 | |
| You can debug mixed Python/C++ in the same GUI. It also works for MPI applications. You can switch between the debuggers and corresponding call stacks. | |
| 1. Packages needed | |
| 1) Visual Studio Code | |
| 2) Extensions for VS Code: | |
| "Python" from Don Jayamanne (I'm using 0.6.7) | |
| This allows VS Code act as the front end to debug python. | |
| This gives VS Code ability to attach to a python script that uses module "ptvsd". |
| const getParamsFromSearchURL = url => url.slice(1).split('&').reduce((params, pairs) => { | |
| const [key, value] = pairs.split('='); | |
| key && value && (params[key] = getValue(value)); | |
| return params; | |
| }, {}); | |
| // this parses foo=true -> make true a bool, not a string | |
| const getValue = value => { | |
| value = decodeURIComponent(value); | |
| try { |
| import ReactUpdates from 'react-dom/lib/ReactUpdates' | |
| import ReactDefaultBatchingStrategy from 'react-dom/lib/ReactDefaultBatchingStrategy' | |
| import 'isomorphic-fetch' | |
| const logError = (err, extra = {}) => { | |
| fetch('/logger', { | |
| method: 'POST', | |
| credentials: 'same-origin', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ |
1.) Download a Nerd Font
2.) Unzip and copy to ~/.fonts
3.) Run the command fc-cache -fv to manually rebuild the font cache
| # Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib | |
| # in an Alpine based Docker image. | |
| FROM alpine:3.4 | |
| RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories | |
| RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev | |
| RUN ln -s /usr/include/locale.h /usr/include/xlocale.h | |
| RUN pip install numpy scipy pandas matplotlib | |
| #!/usr/bin/env bash | |
| if [ "$#" -ne 1 ] | |
| then | |
| echo "Usage: $0 <db_name>" | |
| exit 1 | |
| fi | |
| db_name=$1 |