Skip to content

Instantly share code, notes, and snippets.

[
{"ph":"M","args":{"name":"primary"},"ts":1674018165646000,"tid":0,"pid":6803,"name":"process_name"},
{"ph":"M","args":{"sort_index":0},"ts":1674018165646000,"tid":0,"pid":6803,"name":"process_sort_index"},
{"ph":"M","args":{"name":"lifecycle"},"ts":1674018165646000,"tid":0,"pid":6803,"name":"thread_name"},
{"ph":"M","args":{"sort_index":0},"ts":1674018165646000,"tid":0,"pid":6803,"name":"thread_sort_index"},
{"ph":"B","name":"node_modules/.bin/cucumber-js --profile ios -t @ios and not @wip","pid":6803,"tid":0,"cat":"lifecycle","ts":1674018165646000,"args":{"level":10,"cwd":"/Users/sarinsuriyakoon/Documents/palodev/minerva-hk-testing/e2e","data":{"id":"e7ca915d-65b8-fe1f-ea31-b22581d26ee1","detoxConfig":{"configurationName":"ios.sim.debug","apps":{"default":{"type":"ios.app","binaryPath":"../frontend/ios/build/Build/Products/Debug-iphonesimulator/MinervaHK.app","build":"xcodebuild -workspace ../frontend/ios/MinervaHK.xcworkspace -scheme MinervaHK -configuration Debug -sdk iphonesimulator -derivedDataPat
https://unix.stackexchange.com/questions/151682/alternative-command-for-coloured-viewing-the-size-of-all-files-and-folders
@pacozaa
pacozaa / awkFilterEmail.sh
Created November 18, 2022 04:58
Filter the email list
#!/bin/bash
awk '{gsub("<","",$4); gsub(">","",$4); gsub(",","",$4);print $4}' emailList
#!/bin/bash
read -p "Enter port number(ex. 7070): " PORT_NUMBER
echo "Here is $PORT_NUMBER"
if [ "$PORT_NUMBER" = "" ]; then
echo "No port number to target"
exit 0
fi
echo "Finding $PORT_NUMBER .... PID"
PID_FINDING=$(sudo lsof -iTCP -sTCP:LISTEN -n -P | grep $PORT_NUMBER)
#!/bin/bash
echo "Let's look at what you have:"
emulator -list-avds
# emulator @Pixel_2_XL_API_29
read -p "Enter target devices: " DEVICE_NAME
if [ "$DEVICE_NAME" = "" ]
then
emulator @Pixel_2_XL_API_29
else
#!/bin/bash
helpFunction()
{
echo ""
echo "Usage: $0 -a parameterA -b parameterB -c parameterC"
echo -e "\t-a Description of what is parameterA"
echo -e "\t-b Description of what is parameterB"
echo -e "\t-c Description of what is parameterC"
exit 1 # Exit script after printing help
@pacozaa
pacozaa / tleparser.py
Created October 28, 2016 16:17
Parses a NORAD two line element set into a Python dictionary.
def parse_tle_number(tle_number_string):
split_string = tle_number_string.split('-')
if len(split_string) == 3:
new_number = '-' + str(split_string[1]) + 'e-' + str(int(split_string[2])+1)
elif len(split_string) == 2:
new_number = str(split_string[0]) + 'e-' + str(int(split_string[1])+1)
elif len(split_string) == 1:
new_number = '0.' + str(split_string[0])
else:
raise TypeError('Input is not in the TLE float format')
@pacozaa
pacozaa / letsencrypt.md
Created October 24, 2016 10:42 — forked from xrstf/letsencrypt.md
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@pacozaa
pacozaa / PosPrinter.java
Created June 5, 2016 13:38 — forked from dulichan/PosPrinter.java
COM port printer writing java example
package app.posmachine.machine;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Enumeration;
import javax.comm.CommPortIdentifier;
import javax.comm.SerialPort;
public class PosPrinter {
@pacozaa
pacozaa / compass+pid+motors.js
Created March 22, 2016 02:28
Compass PID controller integration with motors using Johnny-Five.io
var five = require('johnny-five');
var board = new five.Board();
var motorRight;
var motorLeft;
var compass;
var PID = require('pid-controller');
var heading = 0;
var headingSetpoint = 0;
var Kp = 5;