Skip to content

Instantly share code, notes, and snippets.

@noopkat
noopkat / comm_books.txt
Created Jun 9, 2021
Communication books
View comm_books.txt
Recommended by my teachers:
'Casing a Promised Land' by Goodall
'Credibility' by Kouzes & Posner
'Leading Change' by O’Toole
'Inviting Transformation' by Sonja Foss and Karen Foss
'Difficult Conversations: How to Discuss What Matters Most' by Douglas Stone
'Gendered Lives' by Julia Wood and Natalie Fixmer-Oraiz
'Visual Communication for Cyber Security - Beyond Awareness' by Van Deursen
'The Handbook of Communication and Security' by Hamilton and Bean
@markerikson
markerikson / NotificationManager.jsx
Created Jan 21, 2018
React / Redux / Semantic-UI toast notifications implementation
View NotificationManager.jsx
import React, {Component} from "react";
import {connect} from "react-redux";
import _ from "lodash";
import { Message } from "semantic-ui-react";
import {Portal} from 'react-portal';
import {selectNotifications} from "./notificationSelectors";
import {dismissNotification} from "./notificationActions";
@myshov
myshov / function_invocation.js
Last active Oct 12, 2022
11 Ways to Invoke a Function
View function_invocation.js
console.log(1);
(_ => console.log(2))();
eval('console.log(3);');
console.log.call(null, 4);
console.log.apply(null, [5]);
new Function('console.log(6)')();
Reflect.apply(console.log, null, [7])
Reflect.construct(function(){console.log(8)}, []);
Function.prototype.apply.call(console.log, null, [9]);
Function.prototype.call.call(console.log, null, 10);
@tomysmile
tomysmile / mac-php-composer-setup.md
Created Jul 11, 2016
Setup PHP Composer using Brew
View mac-php-composer-setup.md
@PurpleBooth
PurpleBooth / README-Template.md
Last active Dec 5, 2022
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@chinchang
chinchang / xmlToJson.js
Last active Dec 1, 2022
Function to convert XML to JSON
View xmlToJson.js
/**
* Changes XML to JSON
* Modified version from here: http://davidwalsh.name/convert-xml-json
* @param {string} xml XML DOM tree
*/
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) {
@sebmarkbage
sebmarkbage / Enhance.js
Last active Sep 19, 2022
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active Dec 4, 2022
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
View bash-cheatsheet.sh
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@dalelane
dalelane / nodejs_db_with_restapi.js
Created Jun 15, 2014
Node.js, Express, and SQLite to wrap a REST API around an SQL database
View nodejs_db_with_restapi.js
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('data/demodb02');
db.serialize(function() {
db.run("CREATE TABLE IF NOT EXISTS counts (key TEXT, value INTEGER)");
db.run("INSERT INTO counts (key, value) VALUES (?, ?)", "counter", 0);
});