Skip to content

Instantly share code, notes, and snippets.

View AkdM's full-sized avatar
👋

Anthony Da Mota AkdM

👋
View GitHub Profile
@AkdM
AkdM / cornersAndShadow.swift
Last active June 18, 2019 14:53
Swift Playground: Corner Radius + Shadow
import UIKit
import PlaygroundSupport
// For the Playground only: creating an UIView where the next UIView will be shown on
let container = UIView(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
container.backgroundColor = .white
// The interesting stuff
let viewShadow = UIView(frame: CGRect(x: 0, y: 0, width: 120, height: 120))
viewShadow.center = container.center
@AkdM
AkdM / record.sh
Created November 22, 2017 17:33
Record iOS simulator video
xcrun simctl io booted recordVideo filename.mov
@AkdM
AkdM / gist:ccb5a7f27a3624e3d451f013d9bf37eb
Created March 13, 2018 16:11
Git config user config only
git config --global user.useConfigOnly true
@AkdM
AkdM / userChrome.css
Created March 13, 2018 22:08
Partially fixes the GPU and CPU throttle on Firefox with Retina scaled up resolution
.tab-throbber[busy]::before {
background-image: url("chrome://global/skin/icons/loading.png") !important;
animation: none !important;
}
.tab-throbber[busy]:not([progress])::before {
/* Grays the blue during "Connecting" state */
filter: grayscale(100%);
}
@AkdM
AkdM / Edit_Repack_ISO_tutorial.md
Last active April 25, 2024 11:34
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@AkdM
AkdM / bind_port_locally.md
Last active March 23, 2018 01:11
Bind port from SSH locally

If you want to bind the port 19999 (netdata default port for instance) to port 12345:

ssh -N -L 12345:localhost:19999 $SSH_USER@$SSH_IP -p $SSH_PORT

If you need to execute it in background, simply add the -f flag:

ssh -fN -L 12345:localhost:19999 $SSH_USER@$SSH_IP -p $SSH_PORT

then kill it with kill -9 $PID

@AkdM
AkdM / mbp_poweroff_fix.md
Last active March 23, 2018 10:26
Fix MBP slow waking + slow running after poweredoff after sleep

I suspect Filevault from slowering everything btw.

Set to 3 days (259,200 seconds), but I guess you can totally disable it by setting it to 0:

pmset -a autopoweroffdelay 259200

@AkdM
AkdM / userChrome.css
Last active September 14, 2018 15:07
Personal userChrome based on arc-firefox theme
.tabbrowser-tab[selected="true"] {
width: 100%;
visibility: visible;
color: blue;
}
.tab-throbber[busy]::before {
content: "";
position: absolute;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAhOAAAITgBRZYxYAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABtCSURBVHja7d19kF11fcdxd0kIiYnRISQIiIABUjBSE8oQEOIUUURtKBqeFFokaqA6oExpBzBjBitghU5bichTQTKoVSwQBMHiDIJg1FoIBWVQYYgGCAKxYEhCdtPv0bOddWVz7+7eh9/vnNcfrxlGycOc35nzebN7995XbNmy5RUAQL24CAAgAAAAAQAACAAAQAAAAAIAABAAAIAAAAAEAAAgAAAAAQC0xSEfe3pC2C3MC+8tzSv/twmuEQgAoBqDPyUcE64La8OWBtaW/27xa6a4hiAAgLyG/8jwzbChidEfzoby9zjSNQUBAKQ9/HPDd8Yw+sMpfs+5rjEIACCt4Z9efum+vw3jP6C//DOmu+YgAIDuj/+c8Hgbh3+o4s+a49qDAAC6N/7Hh/UdHP8BxZ95vDMAAQB0fvzP6cLwD3WOswABAHRu/BcmMP4DjnUmIACA9o//fuGFhAJgvdcEgAAA2jv+24dHExr/AavDDGcEAgBoTwBcnuD4D/iSMwIBALR+/PcJmxMOgL7wJmcFAgBobQCsSHj8B9zirEAAAK0b//kZjP+A+c4MBADQmgBYnlEALHdmIACAsY//+PBcRgFQ/F3HOzsQAMDYAuDwjMZ/wOHODgQAMLYAWJZhACxzdiAAgLEFwIMZBsCDzg4EADC2AFiXYQC
@AkdM
AkdM / Pure.dvtcolortheme
Created April 19, 2018 12:51
Xcode theme - Pure
<?xml version="1.0" encoding="UTF-8"?>
<!-- Pure Theme v1.0.0
#
# Copyright 2018, All rights reserved
#
# Code licensed under the MIT license
#
# @author Anthony Da Mota
-->
@AkdM
AkdM / color.scss
Last active August 9, 2018 10:32
Colors I like
$dark-blue = #495057 // This is a dark blue. Instead of having black text, this blue is more pleasing and easier on the eyes
$apple-red = #BD1E2E // Red used by Apple for their Apple (PRODUCT)RED™ products
$ddg-red = #E0572A // Red used by DuckDuckGo
$ddg-yellow = #FED400 // Yellow used by DuckDuckGo
$ddg-green = #62BE3E // Green used by DuckDuckGo