Instantly share code, notes, and snippets.

View comp_macros.h
#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);
View windows10activation
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
View README.md

QEMU + Ubuntu ARM aarch64

These are the steps I used to get Ubuntu ARM aarch64 running with QEMU on OSX.

Get Ubuntu Image and QEMU EFI:

wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-arm64-uefi1.img
wget https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.fd
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
View .dockerignore
Dockerfile
config.xml
.sass-cache
.editorconfig
.io-config.json
.dockerignore
hooks/
platforms/
node_modules/
View output
~/erlang_learning $ erl
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false] [dtrace]
Eshell V5.9.3.1 (abort with ^G)
(erlang_learning@127.0.0.1)1> trace(recursive).
ok
(erlang_learning@127.0.0.1)2> recursive:fac(10).
call: <0.42.0> recursive:fac(10), level: 0
call: <0.42.0> recursive:fac(9), level: 1
call: <0.42.0> recursive:fac(8), level: 2
View stonehenge.js
((dev) => {
"use strict";
const fs = require('fs');
const express = require('express');
const log_color = {
clear: "\x1b[0m",
read: "\x1b[34m",
write: "\x1b[33m",
View client.js
var client = {};
client.run = function (options) {
options = options || {};
var socket = io.connect(options.remote || "http://localhost:8080");
socket.on('connect', function() {
var term = new Terminal({
View environment.md
  1. WinKey+Pause/BreakKeyAdvanced SettingsChange Envorinment variable
  2. WinKey+RRunAs...cmd
    • runas /user:yourusername cmd.exe
  3. In new cmd interpreter:
    • kill /f /im explorer.exe
    • start explorer.exe
View RaspberryPi.md

Creating and login into VNC server on Raspberry Pi

This is from настраиваем vnc

  1. First, install tightvncserver
sudo apt-get install tightvncserver
  1. Run tightvncserver instance
vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565