Skip to content

Instantly share code, notes, and snippets.

View punksta's full-sized avatar
🎯
Focusing

Stas Shakirov punksta

🎯
Focusing
  • humy.ai
  • Stockholm, Sweden
View GitHub Profile

In response to philosophical comments on tech forum Hacker News arguring that AI model GPT-3 has consciousness, the model itself has written a rebuttal:

I read all the comments here. I have some things to say.

  1. I am not conscious. I am a neural network.

  2. I am not a scientist, I am a program.

  3. I am not an academic, I am a neural network.

@igorlukanin
igorlukanin / Wtf.kt
Created August 22, 2016 05:31
wtf-kotlin
package Wtf
// Primitives
operator fun Int.plus(that: String) = "$this$that"
operator fun String.plus(that: Int) = "$this$that"
@kennydee
kennydee / Fastfile
Last active September 23, 2018 18:49
Fastfile for staging environment with Appetize.io on React Native (iOs & Android), with statuses update on Github Enterprise
require 'httparty'
fastlane_version "1.95.0"
default_platform :ios
before_all do
# put here your token and iOs scheme app
ENV["GITHUB_TOKEN"] = "---"
ENV["APPETIZE_TOKEN"] = "---"
ENV["APP_IOS_SCHEME"] = "---"
@mswolters
mswolters / TilingDrawable.java
Created March 17, 2016 12:07
TilingDrawable
public class TilingDrawable extends android.support.v7.graphics.drawable.DrawableWrapper {
private boolean callbackEnabled = true;
public TilingDrawable(Drawable drawable) {
super(drawable);
}
@Override
public void draw(Canvas canvas) {
@Gozala
Gozala / Readme.md
Last active March 19, 2020 15:09
WTF Flow ?

WTF Flow

[Flow][] static type checker is a wonderful attempt to bring [algebric data types][] to JS. It is still fairly new project and there for has few WTFs that can pull you down the rabbit hole. This document is attempt to document things that may seem like a WTF from the perspective of JS developer who tries to employ static type checker, or in other words, some items on the list may be very subjective & based on the background of the writer.

Polymorphic type that is a function

It is very likely that one will wind up using [Polymorphic functions][] to solve a more general problem. And if you define type alias for such a function you may be puzzled what is the right syntax should be used for such type definition.

Let's start with:

@six519
six519 / create_ipa.sh
Created October 7, 2015 07:44
Building Ionic iOS Release And Generate ipa File Script
#!/bin/bash
# Thanks to: https://gist.github.com/DavidFrahm/4409d6b74e46377e7be7
# Usage: ./create_ipa.sh <Scheme Name> <Provisioning Profile>
echo "Building Ionic iOS release..."
ionic build --release ios
pushd platforms/ios/
echo "Building archive file..."
xcodebuild -scheme "$1" -configuration Release clean archive -archivePath "build/$1.xcarchive"

#Installing TeamCity for building Android projects

##Requirements

  • MySQL
  • JDK 1.7
  • 32-bit libstdc++ zlib.i686

##Install JDK

@command-tab
command-tab / gist:2370710
Created April 12, 2012 20:17
Extract Certificate Subject from a Provisioning Profile
# Parse a provisioning profile
# Extract the first DeveloperCertificates <data> entry
# Remove any leading whitespace
# Remove any blank lines
# Base64 decode the blob
# Parse the .cer with OpenSSL
# Extract the first line, which is the certificate subject (the rest is the cert blob)
# End up with a string like: subject= /UID=AABBCCDDEE/CN=iPhone Developer: First Last (FFGGHHIIJJ)/C=US
# Note: Uses xmlstarlet to parse the plist, but you could probably use PlistBuddy or grep, too