Skip to content

Instantly share code, notes, and snippets.

Avatar

Андрей Листочкин (Andrey Listochkin) listochkin

View GitHub Profile
@listochkin
listochkin / README.md
Created Oct 17, 2018
No root prompt for Turbo Boost Switcher on TouchID Macs
View README.md

No root prompt for Turbo Boost Switcher on TouchID Macs

Installation:

  1. Enable TouchID for sudo. Open /etc/pam.d/sudo and add auth sufficient pam_tid.so before other rules.
  2. Remove Turbo Boost Switcher from login items
  3. Put turbo-boost-switcher-as-root.sh to /usr/local/bin/
  4. chmod +x /usr/local/bin/turbo-boost-switcher-as-root.sh
  5. Put turboboostswitcher.asroot.plist to ~/Library/LaunchAgents
  6. Run launchctl load ~/Library/LaunchAgents/turboboostswitcher.asroot.plist
@listochkin
listochkin / README.md
Created Jul 9, 2018 — forked from andyshinn/README.md
pbcopy over SSH
View README.md

Install

  • Add pbcopy.plist to your ~/Library/LaunchAgents/ folder.
  • Launch the listener with launchctl load ~/Library/LaunchAgents/pbcopy.plist.
  • Add RemoteForward 2224 127.0.0.1:2224 in your ~/.ssh/config file under your Host * or specific hosts sections.
  • Add [ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224" to your remote ~/.bash_profile or other shell profile.
  • Enjoy pbcopy remotely!
@listochkin
listochkin / keybase.md
Created Jan 24, 2017
Keybase.io Verification
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@listochkin
listochkin / index.html
Created Nov 24, 2016
React Hello World without a build
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello World</title>
<script src="https://unpkg.com/react@latest/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@latest/dist/react-dom.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
</head>
<body>
@listochkin
listochkin / gitter-next-franz-howto.md
Last active Sep 19, 2017
How to Enable Gitter Next in Franz
View gitter-next-franz-howto.md

Switch to Gitter Next in Franz

  1. Open Franz DevTools. They don't have a UI for that but support team told me that Ctrl+Alt+Shift+Fn+Up will do it on Mac laptops. I assume Ctrl+Alt+Shift+PgUp shold work elsewhere.

  2. Franz is an Electron app. All chat windows are WebView elements and you can't inspect them. Select a webview element for Gitter (not the shadow DOM root inside it). Then open a console and type $0.openDevTools(). This is an Electron API.

  3. To turn on Gitter Next paste document.cookie='gitter_staging=staged;domain=.gitter.im;path=/;expires=' + new Date(Date.now() + 31536000000).toUTCString() into the console of the new DevTools window. This one-liner is from Gitter Support article.

  4. You may need to restart Franz after that. Enjoy!

@listochkin
listochkin / martin.js
Created Jun 7, 2016
Put it into a console :)
View martin.js
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]](([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+
@listochkin
listochkin / README.md
Last active May 31, 2016 — forked from thequux/README.md
Multirust-compatible racer wrapper with OS X support
View README.md

This wrapper automatically sets the RUST_SRC_DIRECTORY environment variable for whatever rust compiler is currently active, automatically creating a new checkout whenever necessary. This should be compatible with all of the multirust-alike tools, but it has only been tested with rustup.rs

Installation

Simply place this somewhere on your path before the main racer binary and set the execute bit.

Uninstallation

@listochkin
listochkin / timsort.java
Created Mar 29, 2016
Port of original Timsort from Python by Josh Bloch
View timsort.java
// See the original at http://cr.openjdk.java.net/~martin/webrevs/openjdk7/timsort/raw_files/new/src/share/classes/java/util/TimSort.java
// and the original description at http://svn.python.org/projects/python/trunk/Objects/listsort.txt
/*
* Copyright 2009 Google Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
@listochkin
listochkin / yaroslavskiy-sort.java
Created Mar 29, 2016
Yaroslavsky Sort: 2-pivot quicksort + Insertion sort for smaller chunks
View yaroslavskiy-sort.java
// See original announcement at http://permalink.gmane.org/gmane.comp.java.openjdk.core-libs.devel/2628
/**
* <at> author Vladimir Yaroslavskiy
* <at> version 2009.09.10 m765
*/
public class DualPivotQuicksort {
public static void sort(int[] a) {
sort(a, 0, a.length);
@listochkin
listochkin / dev-ua-jobs-rules.md
Last active Jul 15, 2020
Dev-UA Rules for Job Posting
View dev-ua-jobs-rules.md

Правила публикации вакансий в Frontend UA Jobs / Dev-UA Jobs

  1. Одно объявление от одного пользователя в день. Объявление текстом в сообщении, а не ссылкой на какой-то сайт вакансий. В объявлении можно описать несколько вакансий, но в рамках одной компании или команды.
  2. Разрешается публиковать вакансии в компаниях, где сам автор не работает и не участвует, но при условии, что автор может дать ответы на все вопросы о вакансии.
  3. В объявлении стоит описывать:
    • чем занимается команда, что за продукт, какая у компании бизнес-модель, какие источники финансирования проекта, какие риски присутствуют у потенциального соискателя в случае, если он согласится участвовать.
    • тип работы: временный контракт, сдельная, полная занятость, возможна ли удаленка, готовы ли вы перевозить сотрудника из другого города и страны (и какую визу при этом открываете)
    • стек технологий: что используете почему? Если вы не можете ответить на этот вопрос, то лучше вакансию не постить.
    • организация процесса:
You can’t perform that action at this time.