Skip to content

Instantly share code, notes, and snippets.

@jacobparra
jacobparra / README.md
Last active May 19, 2024 14:08
Confluent Kafka with docker-compose

Confluent Kafka with docker-compose

This is an example app of how setup and use kafka.

The docker-compose provide access to the following services:

  • Zookeeper: port 2181
  • Kafka: port 9092
  • Schema Registry: port 8081
  • Kafka Rest: port 8082
@Iman
Iman / clean.sh
Last active May 19, 2024 14:08
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active May 19, 2024 14:03
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@jareware
jareware / SCSS.md
Last active May 19, 2024 14:03
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2024 14:00
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mbhutton
mbhutton / workflowy-find-popup.js
Last active May 19, 2024 14:00
Tampermonkey script for searching using a popup dialog, as an alternative to find-as-you-type
// ==UserScript==
// @name Workflowy: Search shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Workflowy customisations
// @author Matt Hutton
// @match https://workflowy.com*
// @grant none
// @run-at document-end
// ==/UserScript==
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 19, 2024 13:59
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@ausfestivus
ausfestivus / AzureRegionData.md
Last active May 19, 2024 13:59
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
2070 Paradigm Shift Transcript
Transcribed by Edwin Finch
Sam, you're a legend. Enjoy
==============================
Whew.
Hey.