Skip to content

Instantly share code, notes, and snippets.

View reloni's full-sized avatar
🐡

Anton Efimenko reloni

🐡
  • Moscow
View GitHub Profile
@jensmeder
jensmeder / Dockerfile
Last active March 23, 2024 21:13
Dockerfile for running x86 applications with Wine in Alpine Docker Containers
FROM i386/alpine:3.10.2
# Wine 32Bit for running EXE
RUN apk add --no-cache wine=3.0.4-r1 freetype=2.10.0-r0
# Configure Wine
RUN winecfg
# Install wget
RUN apk add --no-cache wget=1.20.3-r0
@BretFisher
BretFisher / docker-for-mac.md
Last active November 8, 2024 13:45
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


import PlaygroundSupport
import RxSwift
PlaygroundPage.current.needsIndefiniteExecution = true
extension ObservableType where E: Sequence {
typealias T = E.Iterator.Element
/// Create an observable which is an Array of the projected values
@ignasio
ignasio / elasticsearch.yml
Created July 18, 2016 08:31
elasticsearch config for russian morphology based on hunspell
index:
number_of_shards: 3
number_of_replicas: 0 # not for production
analysis:
char_filter:
ru:
type: mapping
mappings: ['Ё=>Е', 'ё=>е']
analyzer:
ru_RU:
//
// MockURLProtocol.swift
// SolutoHome
//
// Created by Omer Levi Hevroni on 2/23/16.
// Copyright © 2016 Soluto. All rights reserved.
//
import Foundation
@chriseidhof
chriseidhof / json.swift
Last active March 21, 2019 07:45
Reflection
import Cocoa
struct Person {
var name: String = "John"
var age: Int = 50
var dutch: Bool = false
var address: Address? = Address(street: "Market St.")
}
struct Address {
@armstrongnate
armstrongnate / basic-auth.swift
Created July 20, 2014 21:45
HTTP Basic Authentication using NSURLSession in swift
import Foundation
let config = NSURLSessionConfiguration.defaultSessionConfiguration()
let userPasswordString = "[email protected]:password"
let userPasswordData = userPasswordString.dataUsingEncoding(NSUTF8StringEncoding)
let base64EncodedCredential = userPasswordData!.base64EncodedStringWithOptions(nil)
let authString = "Basic \(base64EncodedCredential)"
config.HTTPAdditionalHeaders = ["Authorization" : authString]
let session = NSURLSession(configuration: config)
//
// ViewController.m
// AVPlayerCaching
//
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
//
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)