Skip to content

Instantly share code, notes, and snippets.

@busypeoples
busypeoples / TypeScriptFundamentals.ts
Last active June 21, 2022 14:57
TypeScript Fundamentals For JavaScript Developers
// TypeScript Fundamentals For JavaScript Developers
/*
Tutorial for JavaScript Developers wanting to get started with TypeScript.
Thorough walkthrough of all the basic features.
We will go through the basic features to gain a better understanding of the fundamentals.
You can uncomment the features one by one and work through this tutorial.
If you have any questions or feedback please connect via Twitter:
A. Sharif : https://twitter.com/sharifsbeat
*/
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active May 22, 2024 06:03
Online Resources For Web Developers (No Downloading)
@evansde77
evansde77 / mock_requests.py
Last active January 31, 2024 08:49
Example of mocking requests calls
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError
@ursuad
ursuad / kafka-cheat-sheet.md
Last active March 14, 2024 10:32
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@mjsisley
mjsisley / *.html
Last active July 24, 2019 05:49
Webpack Config for Cookiecutter Django
...
{% block css %}
...
{% if not debug %}
<!-- Currently, the css is included as part of javascript in development-->
<!-- This includes the built css for production (I am currently using Grunt for this) -->
<!-- If ExtractTextPlugin is configured properly, Webpack can handle separate css in development and production -->
@kwmiebach
kwmiebach / pytest.md
Last active May 11, 2024 15:17 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@jhusain
jhusain / gist:4b14f5069f3a254cfa0a
Created April 19, 2015 16:27
Converting event to Observable
function fromEvent(dom, eventName) {
return {
forEach: function(observer) {
var handler = (e) => {
observer.onNext(e);
};
dom.addEventListener(eventName, handler);
// Subscription
return {
@staltz
staltz / introrx.md
Last active May 26, 2024 04:06
The introduction to Reactive Programming you've been missing
@s4553711
s4553711 / gist:9488399
Created March 11, 2014 15:41
Some example for subprocess.Popen exception example
#!/usr/bin/python
import subprocess
import os
import sys
#res = subprocess.Popen(['ls','-al','/ahome'],stdout=subprocess.PIPE,stderr=subprocess.PIPE);
#output,error = res.communicate()
#if res.returncode:
# #raise Exception(error)
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 23, 2024 23:26
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k