Skip to content

Instantly share code, notes, and snippets.

ivan baktsheev apla

  • apla.me
Block or report user

Report or block apla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@apla
apla / macOS.txt
Created May 2, 2019
node_exporter output
View macOS.txt
## curl http://127.0.0.1:9100/metrics
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
@apla
apla / ls
Created Jul 22, 2018
how apple handles incorrect permissions
View ls
ls -la /usr/local/
total 8200
drwxr-xr-x 15 root wheel 480 Jan 23 16:47 .
drwxr-xr-x@ 11 root wheel 352 Jul 11 00:54 ..
-rw-r--r-- 1 user wheel 0 Jul 22 03:20 .com.apple.installer.keep
drwx------ 72 user staff 2304 Jul 22 03:55 Cellar
drwxr-xr-x 4 user admin 128 Mar 7 23:25 Frameworks
drwxrwxr-x 17 user admin 544 Jul 19 09:15 Homebrew
drwxrwxr-x 466 user admin 14912 Jul 22 03:55 bin
-rw-r--r-- 1 root wheel 3970951 Apr 15 08:49 createnetwork.log
@apla
apla / clone.sh
Last active Sep 30, 2018
Linux clone disk
View clone.sh
#!/bin/bash
# parted --list
sudo lsblk -o name,mountpoint,parttype,partlabel,label,size,uuid
DISKS=( $(lsblk --nodeps -n -o name) )
read -e -p "Source disk: " -i "sda" FROM
read -e -p "Destination disk: " -i "sdb" TO
@apla
apla / a.bash
Created Sep 30, 2017
macOS Library/Mail account identifiers to username conversion
View a.bash
ls -1 ~/Library/Mail/V5 | xargs -I {} sqlite3 -noheader -column ~/Library/Accounts/Accounts4.sqlite "select ZIDENTIFIER || ' => ' || ZUSERNAME || '/' || ZACCOUNTDESCRIPTION || ' ACTIVE: ' || ZACTIVE from ZACCOUNT where ZIDENTIFIER = '{}'"
View INDEX.md

Preview:

  1. Copy jscad file contents to the OpenJSCad.org

Prepare and edit:

  1. Download and install Atom editor
  2. Launch Atom, then go to the plugins, search and install atom-jscad package
  3. Save all the files from this gist to the folder on your computer
  4. Open folder with Atom editor
@apla
apla / index.css
Created Dec 31, 2016
test for a linked graphs
View index.css
.shadergraph-graph {
font: 12px sans-serif;
line-height: 25px;
position: relative;
}
.shadergraph-graph:after {
content: ' ';
display: block;
height: 0;
font-size: 0;
@apla
apla / build-chromium-windows.bat
Last active May 25, 2019
Build CEF# from source with mp4
View build-chromium-windows.bat
@echo off
REM instructions from: https://groups.google.com/d/msg/cefsharp/BJLMXl9c204/HMJlp8mZzF0J
REM seems like partial instructions copied to SO: http://stackoverflow.com/questions/8033495/chromium-embedded-framework-mp3-support
REM all chromium releases: https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md#markdown-header-release-branches
REM 2272 - latest chromium with npapi (41)
REM there is a commits list: https://bitbucket.org/chromiumembedded/cef/branch/2272
REM https://github.com/cefsharp/CefSharp
REM cef builds http://www.magpcss.net/cef_downloads/
REM https://cefbuilds.com
@apla
apla / index.html
Created Jan 24, 2016
base mocha reporter for browser test
View index.html
<html>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.3.4/mocha.min.js"></script>
<script type="text/javascript">
function reporter (runner) {
var stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 };
var failures = this.failures = [];
if (!runner) {
return;
@apla
apla / basic.proto
Created Jan 15, 2016
protocol-buffers error
View basic.proto
package BasicProtobuf;
message ConnectionResponse
{
required ResponseCode responseCode = 1;
required string sessionId = 2;
optional string message = 3;
@apla
apla / DA14580.agent.nut
Last active Aug 29, 2015 — forked from blindman2k/DA14580.agent.nut
Dialog DA14580 programmer. Upload a HEX file and it programs the DA14580.
View DA14580.agent.nut
server.log("Agent started, URL is " + http.agenturl());
//------------------------------------------------------------------------------------------------------------------------------
program <- null;
html <- @"<HTML>
<BODY>
<form method='POST' enctype='multipart/form-data'>
You can’t perform that action at this time.