Skip to content

Instantly share code, notes, and snippets.

View saintbyte's full-sized avatar
🌏
заапгрейдить и пропатчить

Yegor Kazantsev saintbyte

🌏
заапгрейдить и пропатчить
View GitHub Profile
@tomasperezv
tomasperezv / gist:5175824
Last active June 12, 2018 21:15
Communication between multiple tabs, using local storage changes
// User has 2 tabs open: Page 1 and Page 2, both in the same domain
// , subdomain and protocotol
// Page1: https://subdomain.domain.com
...
var data = {
a: 5,
// Local storage won't be triggered unless the value is different,
// so we add a random identifier.
id: Math.floor((Math.random()*1000)+1)
@BlaayLock
BlaayLock / Convert Unicode to ASCII without errors, utf8 -> cp1251
Last active May 29, 2020 17:50
Python: Convert Unicode to ASCII without errors, utf8 -> cp1251
#! python2
# //coding: utf-8
# coding=utf-8
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
a = u'1a'
a = a.decode('utf-8').encode('cp1251')
print a
@ozgurshn
ozgurshn / predictionOnCoreML.py
Last active September 4, 2020 08:38
Prediction on Core ML model with PIL image input
##https://github.com/apple/coremltools/blob/master/examples/APIExamples.md
import coremltools
import numpy as np
import PIL.Image
# load a model whose input type is "Image"
model = coremltools.models.MLModel('path/to/the/saved/model.mlmodel')
Height = 20 # use the correct input image height
Width = 60 # use the correct input image width
iOS Maps Frameworks
Google Maps SDK for iOS
https://developers.google.com/maps/documentation/ios/
New to the market. Good choice if you wanted to do Android development (Google Maps SDK for Android).
Requires API key. API keys are not readily available. Submitted application for API key. Response can be found at:
@MatthewScholefield
MatthewScholefield / LICENSE
Last active September 19, 2022 15:00
Precise streaming over sockets example
Copyright 2018 Matthew Scholefield
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
@geek-at
geek-at / parse_austria.php
Last active November 1, 2022 03:02
Parsing ip data from a file
<?php
$infile = 'austria.csv';
$outfile = 'austria.ips';
$fp = fopen($outfile,'w');
$handle = fopen($infile, "r");
if ($handle)
{
while (($line = fgets($handle)) !== false) {
$line = trim($line);
@AlexanderGreyFox
AlexanderGreyFox / to_tree_func.py
Created April 20, 2022 14:23
Написать функцию, строящую дерево по списку пар id (id родителя, id потомка), где None - id корневого узла.
def to_tree(source: list):
i = 0
result = dict()
node = result
while i < len(source):
parent = source[i][0]
child = source[i][1]
if parent is None:
result.update({child: {}})
i += 1
@guillaumepiot
guillaumepiot / PYTHON - Convert URL in text to anchor tags (links)
Created January 15, 2013 16:42
PYTHON - Convert URL in text to anchor tags (links)
@hsiboy
hsiboy / navtex.ino
Created October 8, 2019 22:13
Simple Navtex receiver - https://youtu.be/SwL_ZQ_iBIM
/*
* Simple Navtex receiver - https://youtu.be/SwL_ZQ_iBIM
*
* by Martin Kuettner <berry@fmode.de> 03/2016
*
*
* Porting the 80C51 Assembler Program from "A NAVTEX Receiver for the DXer":
*
* Klaus Betke, Am Entengrund 7, D-26160 Bad Zwischenahn, Email: betke@itap.de
* 11-AUG-00/01-OCT-00