Skip to content

Instantly share code, notes, and snippets.

View m7v's full-sized avatar
🇯🇵
私はノボシビルスクのエンジニアです

Andrew Mikhailov m7v

🇯🇵
私はノボシビルスクのエンジニアです
View GitHub Profile
@m7v
m7v / sw.js
Created March 16, 2018 04:02 — forked from tkh44/sw.js
Example of syncing some redux state with a service worker
const swSupported = !!('serviceWorker' in navigator)
const sendMessage = (messageData) => {
if (!swSupported) {
return
}
navigator.serviceWorker.controller.postMessage(messageData)
}
@m7v
m7v / sw.js
Created March 16, 2018 04:02 — forked from tkh44/sw.js
Example of syncing some redux state with a service worker
const swSupported = !!('serviceWorker' in navigator)
const sendMessage = (messageData) => {
if (!swSupported) {
return
}
navigator.serviceWorker.controller.postMessage(messageData)
}
@m7v
m7v / gist:06c5039cc50c071e3f8332cdf56eb856
Created February 6, 2018 05:42 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@m7v
m7v / gource.sh
Created February 2, 2018 15:03 — forked from XueshiQiao/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install
@m7v
m7v / how-to-gource.sh
Created February 2, 2018 14:29 — forked from miguelsaddress/how-to-gource.sh
Install Gource in Ubuntu (gource.io)
#Install Gource in Ubuntu
========================
#Go to the folder.... and
#see http://tylerfrankenstein.com/code/install-gource-ubuntu-1010-visualize-git-repo
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-image-dev libpcre3-dev libfreetype6-dev libglew-dev libglm-dev libboost-filesystem-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libtinyxml-dev
./configure
make
sudo make install
gource -f -960x540 --disable-progress --seconds-per-day 0.5 --stop-on-idle --auto-skip-seconds 0.1 --title project --file-idle-time 0 --hide filenames,progress,mouse --output-ppm-stream - | ffmpeg -y -r 30 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
@m7v
m7v / gist:b4c375a9004b1752436fbab208062124
Created May 29, 2017 04:53 — forked from kjunggithub/gist:8330157
git hubflow cheaetsheet

Git HubFlow Cheat Sheet

Preparing the repository

Create the repository on GitHub/Bitbucket. Once created, clone the created repository to your local machine using:

git clone git@github.com:username/repository.git

CD into the repository folder and run the init command to enable to hub flow tools:

cd repo_name
@m7v
m7v / git-rebase.markdown
Created May 26, 2017 03:29 — forked from lgmkr/git-rebase.markdown
Git rebase workflow

Checkout a new working branch

 git checkout -b <branchname>

Make Changes

 git add
 git commit -m "description of changes"

Sync with remote

@m7v
m7v / client.js
Created July 7, 2016 04:01 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@m7v
m7v / Sublime Text 3 Build 3103 License Key - CRACK
Last active May 23, 2016 16:31
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04