Skip to content

Instantly share code, notes, and snippets.

@lcsouzamenezes
lcsouzamenezes / MakerUNOSIM7600.ino
Created May 1, 2024 21:23 — forked from IdrisCytron/MakerUNOSIM7600.ino
Send and receive SMS using SIM7600 GSM module and Arduino.
/*
Project: Interfacing SIM7600 GSM Module with Maker UNO
Item used:
- Maker UNO https://www.cytron.io/p-maker-uno
- SIM7600 https://www.cytron.io/p-4g-3g-2g-gsm-gprs-gnss-hat-for-raspberry-pi
*/
#include <SoftwareSerial.h>
#include "Adafruit_FONA.h"
@OrionReed
OrionReed / dom3d.js
Last active May 1, 2024 21:23
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@jalogut
jalogut / docker_space_cheat_sheet.md
Last active May 1, 2024 21:21
Cheat sheet to check disk usage on docker. Identify what takes most of your space

Total disk size configuration (Mac)

ls -klsh ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

Total disk usage (Mac)

du -h ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw
@zhuowei
zhuowei / reachable_services.txt
Created February 21, 2023 06:26
Reachable Mach services from the app sandbox on iOS 16.1
PurpleSystemAppPort
PurpleSystemEventPort
UIASTNotificationCenter
com.apple.ABDatabaseDoctor
com.apple.AppSSO.service-xpc
com.apple.AuthenticationServicesCore.AuthenticationServicesAgent
com.apple.CARenderServer
com.apple.ClipServices.clipserviced
com.apple.CoreAuthentication.daemon
com.apple.DeviceAccess.xpc

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@marc-x-andre
marc-x-andre / event_emitter.py
Created June 26, 2020 21:23
A event emitter in Python
from typing import Dict
class EventEmitter:
def __init__(self):
self._callbacks: Dict[str, callable] = {}
def on(self, event_name, function):
self._callbacks[event_name] = self._callbacks.get(event_name, []) + [function]
@dgeibi
dgeibi / normal.js
Last active May 1, 2024 21:16
[ES6 Class]
class Point {
set X(v) {
this.x = v;
}
get X() {
return this.x;
}
getX() {
console.log(this.X);
}
@wuchengwei
wuchengwei / NodeJS - Http Post.js
Created December 26, 2011 08:34
NodeJS - Http Post
//doHttpPost('localhost', 8000, '/TestPost', 'string' , 'TestTestTestTest', false);
//doHttpPost('localhost', 8000, '/TestPost', 'file' , '/Users/chengwei/Downloads/grid1.png', true);
function doHttpPost(_host, _port, _path, name, value, isFile, fileEncoding) {
var http = require('http'),
fs = require('fs'),
path = require('path'),
boundary = Math.random(),
postData, postOptions, postRequest;
{
"require": {
"slim/slim": "2.*",
"illuminate/database": "*",
"dhorrigan/capsule": "*"
}
}