Skip to content

Instantly share code, notes, and snippets.

View pwittchen's full-sized avatar
🎯
Focusing

Piotr Wittchen pwittchen

🎯
Focusing
View GitHub Profile
@pwittchen
pwittchen / create-fat-framework.sh
Created March 15, 2022 22:59 — forked from sundeepgupta/create-fat-framework.sh
Script to create a universal or "fat" binary for an iOS framework.
#!/bin/bash
# Adapted from http://stackoverflow.com/questions/24039470/xcode-6-ios-creating-a-cocoa-touch-framework-architectures-issues/26691080#26691080
# and https://gist.github.com/cromandini/1a9c4aeab27ca84f5d79
# Create a new aggregate target.
# For the automatically generated scheme, change its build config to "release".
# Ensure this target's "product name" build setting matches the framework's.
# Add a run script with `source "${PROJECT_DIR}/path_to_this_script`
@pwittchen
pwittchen / t470s.md
Created April 24, 2018 16:27 — forked from okapies/t470s.md
Ubuntu 16.04 on ThinkPad T470s

This is a document describing how to install Ubuntu 16.04 LTS on ThinkPad T470s.

My Hardware

  • CPU: Intel Core i7-7600U (2.80GHz, 4MB cache)
  • Graphics: Intel HD Graphics 620
  • Display: 14” WQHD (2560 X 1440) IPS Non-Touch Anti-Glare
  • Memory: 24GB DDR4 2133 MHz (8GB Onboard + 16GB)
  • SSD: PCIe-NVMe 256G OPAL 2.0
  • Wireless: Intel Dual Band Wireless AC (2x2) 8265 Bluetooth 4.1
  • Fingerprint Reader
# Reference:
https://www.cloudgear.net/blog/2015/5-minutes-kubernetes-setup/
# install homebrew and cask
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
@pwittchen
pwittchen / coworking.md
Created January 27, 2018 01:36 — forked from mackuba/coworking.md
Lista coworkingów w Krakowie

Coworking w Krakowie

Studio Kreatywnej Współpracy

http://www.studioprzylea.pl

Adres: ul. Królewska 2/2

  • miesiąc - 420 + VAT
  • 10 dni - 230 + VAT
@pwittchen
pwittchen / mysql-docker.sh
Created January 12, 2018 16:13 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@pwittchen
pwittchen / JavaPasswordSecurity.java
Created November 20, 2017 09:57 — forked from jtan189/JavaPasswordSecurity.java
Java PBKDF2 Password Hashing Code
import java.security.SecureRandom;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/*
* PBKDF2 salted password hashing.
* Author: havoc AT defuse.ca
@pwittchen
pwittchen / logback.xml
Created October 22, 2017 21:19 — forked from vazexqi/logback.xml
sfl4j logging with Groovy using Gradle to manage dependencies (logback.xml) See http://vazexqi.github.com/posts/2013/02/24/groovy-sfl4j.html
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %ms
@pwittchen
pwittchen / install-firefox-nightly.md
Created October 7, 2017 12:06 — forked from brenopolanski/install-firefox-nightly.md
Install Firefox Nightly in Ubuntu via PPA

via: http://www.webupd8.org/2011/05/install-firefox-nightly-from-ubuntu-ppa.html

Add the Mozilla Daily PPA (available for Ubuntu 11.04, 10.10 and 10.04) and install Firefox Nightly using the commands below:

$ [sudo] add-apt-repository ppa:ubuntu-mozilla-daily/ppa
$ [sudo] apt-get update
$ [sudo] apt-get install firefox-trunk

Since this is a daily builds PPA, it's nowhere near stable so use it at your own risk!

@pwittchen
pwittchen / readme.md
Created May 5, 2017 16:37 — forked from max-mapper/readme.md
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

@pwittchen
pwittchen / 0-react-hello-world.md
Created April 12, 2017 15:44 — forked from danawoodman/0-react-hello-world.md
React Hello World Examples

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.