Skip to content

Instantly share code, notes, and snippets.

@ilyadoroshin
ilyadoroshin / tap.d.ts
Last active February 13, 2020 07:41
Typings for node-tap, gathered from many places and slightly tuned
// tap.d.ts
declare module 'tap' {
export const tap: Tap;
export interface Tap extends Test {
Test: TestConstructor
mocha: Mocha
mochaGlobals: () => void
}
@ilyadoroshin
ilyadoroshin / byobu_cheat_sheet.md
Created January 8, 2017 23:12
Byobu cheat sheet

Byobu cheat sheet

How to use split windows

C-A | or C-A V  horizontal
C-A % or C-A S vertically
C-A TAB         move to next split
@ilyadoroshin
ilyadoroshin / byobuCommands
Created January 8, 2017 21:47 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@ilyadoroshin
ilyadoroshin / InstallReferrerReceiver.java
Created August 31, 2016 18:14 — forked from ggrell/InstallReferrerReceiver.java
A BroadcastReceiver for handling install referrer market broadcasts
public class InstallReferrerReceiver extends BroadcastReceiver {
private static final String TAG = "InstallReferrerReceiver";
@Override
public void onReceive(Context context, Intent intent) {
AnalyticsTrackerFactory.setApiKey(context.getResources().getString(R.string.flurry_key));
HashMap<String, String> values = new HashMap<String, String>();
try {
if (intent.hasExtra("referrer")) {
@ilyadoroshin
ilyadoroshin / gist:a2228cb6e526d32153e9afd499293f79
Created August 1, 2016 22:12 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@ilyadoroshin
ilyadoroshin / viewport-units-ios.scss
Created May 3, 2016 19:29 — forked from BenMorel/viewport-units-ios.scss
SCSS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
@ilyadoroshin
ilyadoroshin / destructuring.js
Created April 28, 2016 13:02 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
@ilyadoroshin
ilyadoroshin / clean-rails-logs
Created April 27, 2016 11:08 — forked from eddanger/clean-rails-logs
Rails Log Cleaner
#!/usr/bin/env ruby
logfiles = Dir["#{ENV['HOME']}/**/app/../log/*.log"] # any file with a .log extension in a log directory besides an app directory...
logfiles.each {|file| system "echo '' > #{file}"}
puts "Cleaned #{logfiles.size} logs..."
@ilyadoroshin
ilyadoroshin / fiddle.css
Created April 5, 2016 13:46 — forked from digitalicarus/fiddle.css
React Animation: List Filter Animation
.super-fly-list-component .measure {
position: absolute;
left: -9999px;
}
.super-fly-list-component {
position: relative;
}
.super-fly-list-component li {
position: absolute;
transition: opacity .3s ease, transform .3s ease, top .1s ease;
@ilyadoroshin
ilyadoroshin / gist:05b7d1f930cc7d01d59a
Created December 10, 2015 17:23 — forked from afeld/gist:5704079
Using Rails+Bower on Heroku