Skip to content

Instantly share code, notes, and snippets.

View malgamves's full-sized avatar

Daniel Madalitso Phiri malgamves

View GitHub Profile
[
{
"rank": 1,
"title": "Like a Rolling Stone",
"artist": "Bob Dylan",
"album": "Highway 61 Revisited",
"year": "1965"
},
{
"rank": 2,
@malgamves
malgamves / plugins.js
Created March 3, 2022 18:47
Strapi Gatsby Workshop
module.exports = ({ env }) => ({
// ...
upload: {
config: {
provider: 'cloudinary',
providerOptions: {
cloud_name: env('CLOUDINARY_NAME'),
api_key: env('CLOUDINARY_KEY'),
api_secret: env('CLOUDINARY_SECRET'),
},
@malgamves
malgamves / app.js
Last active September 16, 2019 15:08
const pubnub = new PubNub({
publishKey: 'ENTER_YOUR_PUBLISH_KEY_HERE',
subscribeKey: 'ENTER_YOUR_SUBSCRIBE_KEY_HERE'
});
let drawChannel = "draw";
let chatChannel = "chat";
let colorChannel = "color";
/* Drawing Section */
<html>
<head>
<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" />
</head>
<body>
@malgamves
malgamves / script.js
Last active August 22, 2019 09:30
problematic script.js
var mspaint = {
sketchSelector: "",
paintSelector: "",
paintContext: null,
currentIcon: null,
canvas: null,
start: function(selector1, selector2) {
this.sketchSelector = selector1;
this.paintSelector = selector2;
body, html {
margin: 0;
padding: 0;
height: 100%; }
div.about {
display: none;
}
/* The Modal (background) */
@malgamves
malgamves / about-me.md
Last active June 4, 2019 04:58
Need a Developer Advocate? Hire Me 🤷‍♂️

✨ Developer Advocate ✨
✨ Python, JavaScript and GraphQL ✨
✨ Community Lead & Speaker ✨

Daniel Madalitso Phiri

🦖

@malgamves
malgamves / Resume.gif
Last active May 9, 2019 05:37
Daniel Madalitso Phiri - CV
Resume.gif
@malgamves
malgamves / App.vue
Last active May 5, 2019 20:07
App.vue for a realtime Vue App using GraphQL
<template>
<div id="app">
<div class="container">
<div class="row">
<div class="column">
<h2>Who Might Die ⚔️</h2>
</div>
<div class="column">
<h2
v-if="loading"
import gql from 'graphql-tag'
export const ADD_VOTE_MUTATION = gql`
mutation updateVotes($id: Int!) {
update_characters(where: {id: {_eq: $id}},
_inc: {votes: 1}) {
affected_rows
}
}
`;