Skip to content

Instantly share code, notes, and snippets.

View fmal's full-sized avatar
🕺

Filip Malinowski fmal

🕺
View GitHub Profile
@fmal
fmal / request-admin.scpt
Created August 21, 2024 14:34
admin by request automation
tell application "Admin By Request" to activate
tell application "System Events" to tell process "Admin By Request"
tell menu bar item 1 of menu bar 2
try
click menu item "Request Administrator Access" of menu 1
on error
return
end try
@fmal
fmal / settings.json
Last active September 15, 2024 16:41
amazon Q settings
{
"app.hideMenubarIcon": true,
"autocomplete.fontFamily": "Dank Mono",
"autocomplete.fontSize": 14,
"autocomplete.theme": "poimandres",
"codeWhisperer.shareCodeWhispererContentWithAWS": false,
"inline.enabled": false,
"integrations.hyper.disabled": true,
"telemetry.enabled": false
}
chmod 700 ~/.ssh && \
chmod 600 ~/.ssh/* && \
chmod 644 -f ~/.ssh/*.pub ~/.ssh/authorized_keys ~/.ssh/known_hosts ~/.ssh/config
@fmal
fmal / simplifyToken.js
Last active February 23, 2023 18:47
typescript/module-declarations format
export default function simplifyTokens(obj, mapper = token => token.value) {
const result = {};
for (const key in obj) {
if (!obj[key] || typeof obj[key] !== 'object') {
continue;
}
if ('value' in obj[key]) {
result[key] = mapper(obj[key]);
@fmal
fmal / rm.sh
Created January 23, 2022 17:26
rm android bloat
adb shell pm list packages | grep 'samsung'
pm disable-user com.samsung.android.bixby.service
pm disable-user com.samsung.android.bixby.agent
pm disable-user com.samsung.android.bixby.wakeup
pm disable-user com.samsung.android.visionintelligence
pm disable-user com.samsung.android.app.routines
pm uninstall --user 0 com.samsung.android.mdx
pm uninstall -k --user 0 com.samsung.android.bixby.es.globalaction
pm uninstall --user 0 com.microsoft.appmanager
@fmal
fmal / .huskyrc
Created September 30, 2020 20:13
Make husky hooks work for GUI Git clients when installing yarn from NPM
PATH="/Users/$(whoami)/.asdf/shims:/usr/local/bin:$PATH"
import PropTypes from 'prop-types';
import React from 'react';
import * as colors from '@powel/design-colors';
const uuid = () => {
let id = '';
let random;
let i;
for (i = 0; i < 32; i++) {
pyftsubset "Inter-roman.otf" --unicodes-file=unicodes.txt --layout-features="ss01,ss02,ss03,cpsp,kern,calt" --flavor="woff2" --output-file="inter-roman-subset.woff2"
pyftsubset "Inter-italic.otf" --unicodes-file=unicodes.txt --layout-features="ss01,ss02,ss03,cpsp,kern,calt" --flavor="woff2" --output-file="inter-italic-subset.woff2"
(function(window, document, powelUI, ARRAY) {
'use strict';
var reFileTrim = /^.+\/|\.[^\.]+$/g; // eslint-disable-line
var defaultViewBox = [0, 0, 560, 560];
var defaultElement = document.createElement('x');
var xmlns = 'http://www.w3.org/2000/svg';
function process(file) {
return new Promise(function(resolve) {
@fmal
fmal / gh-actions-hook.php
Created June 6, 2020 10:49
actions hook
<?php
function process ($collection, $data) {
$collectionsToWatch = ['events'];
if (!in_array($collection, $collectionsToWatch)) {
return;
}
$data = [