Skip to content

Instantly share code, notes, and snippets.

View Effective_Engineer.md

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@CodeSlicing
CodeSlicing / DebounceStatePropertyWrapperDemoNative.swift
Created Feb 9, 2022
Native source code for CodeSlicing episode on debouncing user input in a property wrapper
View DebounceStatePropertyWrapperDemoNative.swift
//
// DebounceStatePropertyWrapperDemoNative.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
@Fonserbc
Fonserbc / SwipeInput.cs
Last active Oct 28, 2022
A simple swipe detector for touchscreens for Unity3D. Four cardinal directions.
View SwipeInput.cs
using UnityEngine;
/*
* Swipe Input script for Unity by @fonserbc, free to use wherever
*
* Attack to a gameObject, check the static booleans to check if a swipe has been detected this frame
* Eg: if (SwipeInput.swipedRight) ...
*
*
*/
@cielavenir
cielavenir / readme.md
Created Sep 20, 2021
zoom sandbox-exec for macOS
View readme.md
  1. Download Zoom.pkg from https://zoom.us/download
  2. Extract it using https://www.timdoug.com/unpkg/
  3. Now you have Zoom/zoom.us.app
  4. Launch Zoom by zoom.sh Zoom/zoom.us.app/Contents/MacOS/zoom.us

caveats:

  • Zoom will fail to start meeting for the first time. Just launch again.
  • Zoom will tell that crash happened, but you should ignore it.
@queengooborg
queengooborg / essentials-worth.yml
Last active Oct 28, 2022
A balanced worth.yml file for Bukkit/Spigot servers running 1.13.x+ with EssentialsX
View essentials-worth.yml
#
# Minecraft Essentials worth.yml - optimized for an ideal balanced Economy!
# https://gist.github.com/queengooborg/92d08120f0d6d25175f6c7a30e3ccac7
#
# Compatible MC Version: 1.13.x+
# Latest MC Version: 1.19.x
#
# Maintained by Vinyl Da.i'gyu-Kazotetsu [https://www.queengoob.org]
# Initialy created by X00LA: https://github.com/X00LA/Bukkit-Essentials-worth.yml
# License: GNU General Public License v2.0
@stecman
stecman / _readme.md
Last active Oct 28, 2022
Brother P-Touch PT-P300BT bluetooth driver python
View _readme.md

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

@christophewang
christophewang / MergeSort.cpp
Last active Oct 28, 2022
Merge Sort in C++
View MergeSort.cpp
#include <iostream>
void printArray(int *array, int n)
{
for (int i = 0; i < n; ++i)
std::cout << array[i] << std::endl;
}
void merge(int *array, int low, int mid, int high)
{
@vvb2060
vvb2060 / am_proc_start.cpp
Created Jul 19, 2022
monitor app process start
View am_proc_start.cpp
#include <unistd.h>
#include <string>
#include <cinttypes>
#include <android/log.h>
#include <sys/system_properties.h>
using namespace std;
extern "C" {
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active Oct 28, 2022
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
View all_aws_lambda_modules_python.md
View terminal-cheat-sheet.txt
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help