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 |
| 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 |
| let text = "There’s an interesting discussion on Quora about the differences between Golang and Scala. As a former academic with tendencies towards functional programming, I used to be very tempted by Scala.1 It offers all the functional goodness without the exoticism of Haskell, and came with reasonably good tools and frameworks. Like Clojure, it’s a functional language you can actually do some work with. The problem with Scala is, the more advanced you get, the more complicated (unreadable?) your code becomes. I remember that back in grad school the dude who was able to doodle the craziest and mathematically most challenging solution to some problem in Haskell was someone everyone looked up to. But it turns out in the “real world” simplicity always trumps virtuosity and sophistication, which is one of the many reasons I love Golang so much. A language with no “magic,” good concurrency support, great documentation and community that compiles into machine code and runs faster than Python? Yes, please. Read th |