Skip to content

Instantly share code, notes, and snippets.

View valmayaki's full-sized avatar
🤠
Happy to be of service to you!

Valentine Ubani Mayaki valmayaki

🤠
Happy to be of service to you!
View GitHub Profile
@BalazsGyarmati
BalazsGyarmati / scroll_to_plusminus_macos.swift
Last active April 27, 2024 13:58
Use cmd + scroll wheel to zoom inside apps in MacOS
//
// main.swift
// scroll_to_plusminus
//
// Created by uniqueidentifier on 2021-01-08.
// Modified by alex on 2022-07-08 to use modifiers for scrolling
// Modified by BalazsGyarmati on 2023-01-04 to use command instead of control + respect any keyboard layout for + and -
//
import Foundation
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>658773622.62719798</real>
<key>Macros</key>
@ivastly
ivastly / run_xhprof_viewer.sh
Last active November 23, 2020 17:13
Run Dockerized XHProf Viewer oneliner
# dumps must be in ./xhprof folder, named like uniqid() . 'appname.xhprof';
# use tideways_xhprof extension to generate them https://github.com/tideways/php-xhprof-extension
docker run --rm -p 81:8080 -v $(pwd)/xhprof:/mnt/files/private/xhprof -d --name xhprof wodby/xhprof

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
@jeanlucaslima
jeanlucaslima / Readme.md
Last active October 2, 2023 13:24
Remote Work Resources

Remote Jobs general guideline

This is something I compiled during the last weeks while job hunting. If you miss something in this list, please fork or tell me on twitter and I'll add what's missing.

  1. Be careful with jobs that are not clear they hire outside US
  2. Look for job in niches (like SaaS job boards, language-specific communities, country-focused, and so on)
  3. Avoid Upwork (pay to work, no guaranteed results, often bad contracts) and Remote.com
  4. Remote.co is not Remote.com, remote.co is ok.
  5. There are companies that hire and act as a guild, but only pay as freelancer (X-team, Gun.io, and so on)
  6. Not really focused on freelancing, as it is to me more like a one-person business
@bmatcuk
bmatcuk / create-usb.sh
Created May 30, 2019 04:38
Creating a Bootable Windows USB from ISO on a Mac
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
# This will output a bunch of info about all of the disk drives connected to
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is
# some number starting at 0. Now, insert your USB drive and run the command
# again. You should see a new entry. Make note of the name (ie, /dev/diskX).
diskutil list
@nabilfreeman
nabilfreeman / copyToFat32.sh
Last active May 9, 2023 00:38
FAT32 File copier & splitter (works with Multiman)
#!/bin/bash
# Are you using Mac OS X?
# You need to install coreutils for this to work.
# try `brew install coreutils`
# or `sudo port install coreutils`
# set a part size that works with FAT32 drives
PART_SIZE=3999
# nice little intro
@tistre
tistre / asset-ingestion.bpmn
Last active September 28, 2021 18:15
Simple Camunda example: Handling external tasks with PHP
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0w41w6f" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
<bpmn:process id="asset-ingestion" name="Asset Ingestion" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Asset to be ingested">
<bpmn:outgoing>SequenceFlow_16kf6eb</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_16kf6eb" sourceRef="StartEvent_1" targetRef="extract-metadata" />
<bpmn:serviceTask id="extract-metadata" name="Extract metadata" camunda:type="external" camunda:topic="asset-extract-metadata">
<bpmn:incoming>SequenceFlow_16kf6eb</bpmn:incoming>
self.addEventListener('notificationclick', function(e) {
// Android doesn't automatically close notifications on click
e.notification.close();
// Focus tab if open
e.waitUntil(clients.matchAll({
type: 'window'
}).then(function(clientList) {
for (var i = 0; i < clientList.length; ++i) {
var client = clientList[i];
@eutobias
eutobias / index.lua
Last active May 6, 2024 13:42
Hammerspoon config for horizontal scroll on mouse middle button click
-- Bases in some codes i found on internet
-- but i din't find the links again
-- HANDLE SCROLLING
local scrollmultHorizontal = 2
local scrollmultVertical = 2 -- not used if use only horizontal scroll
local middleMouseEventButtonNumber = 2
hs.eventtap.new(
{"all"},