Skip to content

Instantly share code, notes, and snippets.

View Stmol's full-sized avatar
👨‍🔧
SwiftUI & Flutter

Yury S. Stmol

👨‍🔧
SwiftUI & Flutter
  • Earth
View GitHub Profile
@Stmol
Stmol / webrtc.js
Created October 1, 2013 15:40 — forked from coderaiser/webrtc.js
/*
* пример использования WebRTC
* http://rastacoding.kodingen.com/webrtc
*/
(function(){
'use strict'
/* определяем вариант функции getUserMedia в зависимости от браузера */
navigator.getUserMedia = navigator.getUserMedia || /* версия, которая останется */
navigator.webkitGetUserMedia || /* chrome и safari */
@Stmol
Stmol / README.md
Last active October 3, 2018 16:20 — forked from nikcub/README.md
[Facebook Hack Story] #hack
@Stmol
Stmol / hack.sh
Created May 17, 2014 19:29 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@Stmol
Stmol / Cache.swift
Created March 17, 2018 13:58 — forked from mohamede1945/Cache.swift
NSCache wrapper that works with Swift structs
private class ObjectWrapper {
let value: Any
init(_ value: Any) {
self.value = value
}
}
private class KeyWrapper<KeyType: Hashable>: NSObject {
let key: KeyType
@Stmol
Stmol / scroll_view_height.dart
Created January 24, 2020 09:40 — forked from slightfoot/scroll_view_height.dart
ScrollView With Height for Flutter. Simple ScrollView with its content having a minimum height of the ScrollView's parent. This allows you to space out your components inside your ScrollView to fit the avaliable space and not have them "squish up" when the soft keyboard (IME) appears.
class ScrollViewWithHeight extends StatelessWidget {
final Widget child;
const ScrollViewWithHeight({Key key, this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints) {
return new SingleChildScrollView(
child: new ConstrainedBox(
@Stmol
Stmol / ExportIPA.swift
Created December 26, 2021 15:01 — forked from rileytestut/ExportIPA.swift
Export Swift Playgrounds .ipa
import Foundation
// Export running app as .ipa, then return path to exported file.
// Returns String because app crashes when returning URL from async function for some reason...
func exportIPA() async throws -> String
{
// Path to app bundle
let bundleURL = Bundle.main.bundleURL
// Create Payload/ directory
@Stmol
Stmol / generate-bitcoin-keys.sh
Created February 27, 2023 20:36 — forked from gadiener/generate-bitcoin-keys.sh
OpenSSL commands to create a Bitcoin private/public keys from a ECDSA keypair
#!/bin/sh
PRIVATE_KEY="ECDSA"
PUBLIC_KEY="ECDSA.pub"
BITCOIN_PRIVATE_KEY="bitcoin"
BITCOIN_PUBLIC_KEY="bitcoin.pub"
echo "Generating private key"
openssl ecparam -genkey -name secp256k1 -rand /dev/random -out $PRIVATE_KEY