Skip to content

Instantly share code, notes, and snippets.

View m4rr's full-sized avatar
🚀
IPO

Marat m4rr

🚀
IPO
View GitHub Profile
@m4rr
m4rr / 1641983832.json
Last active January 17, 2022 18:59
Keychron K8 Setup
{
"title": "Keychron K8 Mic Button to Google Meet Mic Mute",
"rules": [
{
"description": "Change Fn+Spacebar to Cmd+D",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
@m4rr
m4rr / macos india wifi.scpt
Last active March 24, 2020 08:53
restart macos wifi if there is no internet connection
repeat 30 times
(* run for 30 minutes every 1 minute *)
repeat 60 * 60 times
(* run for 60 minutes every 1 second *)
set status to do shell script "networksetup -getairportpower en0"
if status ends with "Off" then

Keybase proof

I hereby claim:

  • I am m4rr on github.
  • I am m4rr (https://keybase.io/m4rr) on keybase.
  • I have a public key ASBdAiIIyjGK6lCzTcAz7tZK4Ft72U6aP8NV_QP_AV2IVQo

To claim this, I am signing this object:

@m4rr
m4rr / .zshrc
Created May 16, 2019 13:55
m4rr zshrc to view pull requests
gpr() {
git checkout develop
git pull
git branch -D "$1"
git checkout "$1"
git reset --soft $(git merge-base develop $(git rev-parse --abbrev-ref HEAD))
}
grpr() {
BRANCH=`git rev-parse --abbrev-ref HEAD`
@m4rr
m4rr / vkontakte.js
Created August 2, 2018 12:51
Remove all vk.com wall posts (except 20 first and 20 last items.) First, load all wall posts on single page, then run in console:
(function () { 'use strict'; if (!confirm('Удалить все записи со стены?')) return; var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"]'); for (var i = 20; i < deletePostLink.length - 20; i++) { deletePostLink[i].click(); } alert(deletePostLink.length + ' posts deleted'); }());
@m4rr
m4rr / Fastfile
Created February 7, 2018 14:33
CircleCI Config Fastfile
platform :ios do
before_all do
setup_circle_ci
import_certificate(
keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"],
certificate_path: 'Certificates.p12',
certificate_password: ENV["CERTIFICATE_PASSWORD"] || "default"
)
@m4rr
m4rr / config.yml
Created February 7, 2018 11:54
CircleCI Config YAML
jobs:
# ...
make_build:
macos:
xcode: "9.2.0"
steps:
- checkout
# ...
- run:
name: decode Certificates
@m4rr
m4rr / Fastfile
Created June 19, 2017 13:07
Fastlane UPX
lane :pack do
gym(scheme: "myapp", silent: true)
puts %x( upx ../myapp )
end
@m4rr
m4rr / main.swift
Last active June 19, 2017 10:35
command line calendar
import Foundation.NSFileHandle
import Darwin.C.stdlib
do {
let payload = CommandLine.arguments.dropFirst()
let task = try EventTask.create(fromOrdered: Array(payload))
let calendar = CalendarController()
try calendar.create(event: task)
} catch {
@m4rr
m4rr / gist:9ee53d1d27d6c2c0227bb718d711963a
Created February 28, 2017 06:58
UISelectionFeedbackGenerator iOS 9 compatible
import UIKit
@available(iOS 10.0, *)
private var _generator: UISelectionFeedbackGenerator?
class SelectionFeedbackGenerator {
init() {
if #available(iOS 10, *) {
_generator = UISelectionFeedbackGenerator()