Skip to content

Instantly share code, notes, and snippets.

View kickboxer's full-sized avatar
🕊️

Maksim Mnatsakanov kickboxer

🕊️
View GitHub Profile
@kickboxer
kickboxer / README.md
Created August 5, 2022 09:18 — forked from paolocarrasco/README.md
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

If you'r using MAC Intel CPU you want to use VMware to virtual your desired OS such Windows or Ubuntu on the MAC OS you need to download VMware Fusion Player first then it has two version Pro and Player, the Player version is free for personal use but you need to create VM account to download and licence key.
You can create account to download yourself here:
https://customerconnect.vmware.com/group/vmware/evalcenter?p=fusion-player-personal
If you don't want to create account to get license, you can try below original license key for VMware Fusion Player:
COMPONENT:
VMware Fusion Player – Personal Use
@kickboxer
kickboxer / 1-setup.md
Created February 9, 2022 20:21 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@kickboxer
kickboxer / iframe.html
Created December 13, 2019 14:32 — forked from cirocosta/iframe.html
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">
@kickboxer
kickboxer / gist:710263ed096bff90fbf5558d1888d145
Created August 23, 2018 12:12
Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
// Чтобы git не конвертировал переносы строк автоматом в crlf в скачиваемых репозиториях, прописываем это комманду:
git config --global core.autocrlf false
@kickboxer
kickboxer / gist:abed5b29f6d3a3fd55e0a6ee254d4498
Created October 3, 2016 14:00
Создать новый массив с объектами с уникальными свойствами
var districts = [];
function removeDuplicateDistricts(cities) {
for (let i = 0; i < cities.length; i++) {
if (districts.length === 0) {
districts.push(cities[0]);
} else {
var uniqueDistrict = true;
districts.forEach(function(dist) {
if (cities[i].Region == dist.Region && cities[i].District == dist.District) {
uniqueDistrict = false;
@kickboxer
kickboxer / gist:5028d7d602da63ac5769
Created February 19, 2016 08:49 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
'use strict';
var React = require('react-native');
var {
Bundler,
StyleSheet,
Text,
TouchableHighlight,
View,
ScrollView,
@kickboxer
kickboxer / Generate password.js
Created June 26, 2015 14:33
Generate password
function passGen(charsCount) {
var result = '';
var words = '0123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
var max_position = words.length - 1,
position,
i;
for(i = 0; i < charsCount; ++i) {
position = Math.floor (Math.random() * max_position);
result = result + words.substring(position, position + 1);
}
@kickboxer
kickboxer / Angular checkbox CheckAll.js
Last active August 29, 2015 14:20
Angular checkbox CheckAll
$scope.options = [
{value:'Option1', selected:true},
{value:'Option2', selected:false},
{value:'Option3', selected:false},
{value:'Option4', selected:false},
{value:'Option5', selected:false},
{value:'Option6', selected:false}
];
$scope.toggleAll = function() {