Skip to content

Instantly share code, notes, and snippets.

View naXa777's full-sized avatar
:octocat:

Pavel naXa777

:octocat:
View GitHub Profile
@naXa777
naXa777 / docker_prune_all.sh
Created June 7, 2020 07:49
Prune docker system and remove all containers, images, networks, volumes to reclaim space
#!/bin/sh
# see also https://docs.docker.com/config/pruning/
docker system prune --volumes -f
docker image prune -a -f
@naXa777
naXa777 / git_sync_fork.sh
Last active November 2, 2018 11:22
Git Sync Fork - a shell script for syncing a fork of a repository to keep it up-to-date with the upstream repository
#!/bin/bash
#
# Before you can run this script, you must configure a remote that points to the upstream repository in Git.
# example from .git/config:
# ```
# [remote "origin"]
# url = [email protected]:naXa777/tutorials.git
# fetch = +refs/heads/*:refs/remotes/origin/*
# [remote "upstream"]
# url = https://github.com/eugenp/tutorials
@naXa777
naXa777 / git_setup.sh
Created November 2, 2018 11:09
Git setup - initial configuration script for Ubuntu Linux
#!/bin/bash
apt install git unix2dos dos2unix --yes
git config --global core.autocrlf input
echo "Enter git user.name: "
read name
git config --global user.name "$name"
echo "Enter git user.email: "
read email
git config --global user.email "$email"
@naXa777
naXa777 / ParallelProcess.java
Created December 5, 2016 14:14 — forked from tuxdna/ParallelProcess.java
ParallelProcess to simulate Producer-Consumer problem in Java
import java.util.Random;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
class Producer implements Runnable {
private static int count = 0;
private Random rg = new Random();
private BlockingQueue<Object> queue = null;
public Producer(BlockingQueue<Object> queue) {
@naXa777
naXa777 / EventManager.cs
Last active October 31, 2016 08:43 — forked from bendangelo/EventManager.cs
Unity3D C# Event Manager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class EventManager : MonoBehaviour {
public bool LimitQueueProcesing = false;
public float QueueProcessTime = 0.0f;
private static EventManager s_Instance = null;
private Queue m_eventQueue = new Queue();
@naXa777
naXa777 / cmd.bat
Last active December 20, 2015 21:49
Quick emulator start
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -avd "avd_name"