Skip to content

Instantly share code, notes, and snippets.

Daniel Madalitso Phiri malgamves

Block or report user

Report or block malgamves

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
malgamves / script.js
Last active Aug 22, 2019
problematic script.js
View script.js
var mspaint = {
sketchSelector: "",
paintSelector: "",
paintContext: null,
currentIcon: null,
canvas: null,
start: function(selector1, selector2) {
this.sketchSelector = selector1;
this.paintSelector = selector2;
View app.js
const pubnub = new PubNub({
let drawChannel = "draw";
let chatChannel = "chat";
let colorChannel = "color";
/* Drawing Section */
View main.css
body, html {
margin: 0;
padding: 0;
height: 100%; }
div.about {
display: none;
/* The Modal (background) */
View index.html
<title>_Beep Boop Beep_*printing.....*</title>
<meta name="description" content="" />
<meta name="author" content="Daniel Madalitso Phiri" />
<link rel="stylesheet" href="src/main.css" />
<link rel="stylesheet" type="text/css" href="src/clippy.css" media="all" />
malgamves / Resume.gif
Last active May 9, 2019
Daniel Madalitso Phiri - CV
malgamves /
Last active Jun 4, 2019
Need a Developer Advocate? Hire Me 🤷‍♂️

Developer Advocate
Python, JavaScript and GraphQL
Community Lead & Speaker

Daniel Madalitso Phiri


View graphql.js
import gql from 'graphql-tag'
export const ADD_VOTE_MUTATION = gql`
mutation updateVotes($id: Int!) {
update_characters(where: {id: {_eq: $id}},
_inc: {votes: 1}) {
malgamves / BarChart.js
Created May 4, 2019
Chart.js BarChart Template
View BarChart.js
// CommitChart.js
import { HorizontalBar, mixins } from 'vue-chartjs'
const { reactiveProp } = mixins
export default {
extends: HorizontalBar,
mixins: [reactiveProp],
props: {
chartData: {
malgamves / App.vue
Last active May 5, 2019
App.vue for a realtime Vue App using GraphQL
View App.vue
<div id="app">
<div class="container">
<div class="row">
<div class="column">
<h2>Who Might Die ⚔️</h2>
<div class="column">
malgamves / main.js
Created May 4, 2019
Main.js file for a Realtime Vue App using GraphQL
View main.js
import { ApolloClient } from 'apollo-client'
import { WebSocketLink } from 'apollo-link-ws';
import { HttpLink } from 'apollo-link-http';
import { split } from 'apollo-link';
import { getMainDefinition } from 'apollo-utilities';
import { InMemoryCache } from 'apollo-cache-inmemory';
import Vue from 'vue'
import VueApollo from 'vue-apollo'
import App from './App'
You can’t perform that action at this time.