Skip to content

Instantly share code, notes, and snippets.

View ewnd9's full-sized avatar
💭
Working

ewnd9

💭
Working
View GitHub Profile
@ewnd9
ewnd9 / getUpdates.ts
Created July 30, 2019 17:10
Getting update manifest for lerna programmatically
import VersionCommand from '@lerna/version';
(async () => {
const info = await getUpdated();
console.log(info);
})()
async function getUpdated() {
const Package = require('@lerna/package');
const restore = (() => {
@ewnd9
ewnd9 / install.sh
Created September 11, 2016 05:28
require stream polyfill in react-native
npm install stream --save
mkdir node_modules/stream
echo "module.exports = require('readable-stream');\n" > node_modules/stream/index.js
echo '{ "name": "stream" }' > node_modules/stream/package.json
echo '!/node_modules/stream/' >> .gitignore
@ewnd9
ewnd9 / keybase.md
Created September 10, 2016 03:43
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@ewnd9
ewnd9 / npm-wrapper.sh
Last active January 18, 2016 11:02
Prevent executing "npm install <deps>" without `-S`, `-D`, `--save`, `--save-dev`, `-g` flags
#!/bin/bash
set -e
if ([ "$1" == "install" ] || [ "$1" == "i" ]) && [ "$#" -ne 1 ]; then
for var in "$@"
do
if [ "$var" == "--save" ] || [ "$var" == "--save-dev" ] || [ "$var" == "-S" ] || [ "$var" == "-D" ] || [ "$var" == "-g" ]; then
has_modifier=true
fi
@ewnd9
ewnd9 / disable-vk-player.js
Last active December 30, 2015 18:51
disable-vk-player snippet for preventing accidentally moving to next track
var superFn;
var mockFn = function(id) {
if (id === window.audioPlayer.id) {
superFn(id);
}
};
if (window.playAudioNew.toString() !== mockFn.toString()) {
superFn = window.playAudioNew;
window.playAudioNew = mockFn;
@ewnd9
ewnd9 / install.sh
Last active January 24, 2024 19:38
google's deepdream ubuntu installation
# sources
# http://www.scipy.org/install.html
# http://sohliloquies.blogspot.ru/2015/07/setting-up-deep-dream-google-researchs.html
# https://github.com/BVLC/caffe/wiki/Ubuntu-14.04-VirtualBox-VM
# ~2gb dependencies
mkdir deep-dream && cd deep-dream
sudo apt-get install subversion cmake
@ewnd9
ewnd9 / App.java
Created October 8, 2013 13:53
export files from mongo gridfs
package com.ewnd9;
import java.util.List;
import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.BasicDBObject;
@ewnd9
ewnd9 / Main.scala
Created October 7, 2013 08:24
Genetic Algorithm for finding boolean equations system's solution
import scala.util.Random
/**
* User: ewnd9
* Date: 10/7/13 : 3:25 PM
*/
object Main {
abstract class Term {
def solve(vars: List[Int]): Int = {
@ewnd9
ewnd9 / win8wifi.bat
Created February 5, 2013 14:20
share anything to wifi in win8
netsh wlan set hostednetwork mode=allow ssid=name key=password
netsh wlan start hostednetwork
pause
netsh wlan stop hostednetwork
pause