Skip to content

Instantly share code, notes, and snippets.

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@vvlevchenko
vvlevchenko / Info.plist
Created April 15, 2021 09:03 — forked from bellbind/Info.plist
[macosx][ios][swift3]build and run minimal ios app for simulator with command line only (Xcode-8.1 env, without Storyboard and InterfaceBuilder)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>webkit</string>
<key>CFBundleIdentifier</key>
<string>bellbind.example.webkit</string>
@vvlevchenko
vvlevchenko / gist:7b42d4420cf1295a5ff9dc8fe3bca4e0
Last active May 13, 2020 09:47
dump IR with line numbers
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt
index b97743e9181..85320dff811 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/AdditionalIrUtils.kt
@@ -157,7 +157,7 @@ class NaiveSourceBasedFileEntryImpl(override val name: String, val lineStartOffs
//-------------------------------------------------------------------------//
override fun getLineNumber(offset: Int): Int {
- assert(offset != UNDEFINED_OFFSET)
+ if (offset == UNDEFINED_OFFSET) return 0
@vvlevchenko
vvlevchenko / patch
Created January 17, 2019 14:15
publishing libcurl example with bintray/maven-publish
diff --git a/samples/gradle/wrapper/gradle-wrapper.properties b/samples/gradle/wrapper/gradle-wrapper.properties
index e6a30918e..d76b502e2 100644
--- a/samples/gradle/wrapper/gradle-wrapper.properties
+++ b/samples/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
zipStoreBase=GRADLE_USER_HOME
fun main() {
println("Hello!")
}
command script import dist/tools/konan_lldb.py
process connect connect://[::1]:8888
b -f 1.kt -l 2
c
n
s
c
(lldb) b -f 1.kt -l 2
Breakpoint 1: where = program.kexe`kfun:main() + 4 at 1.kt:2, address = 0x00000001000089a4
(lldb) r
Process 88697 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x00000001000089a4 program.kexe`kfun:main() at 1.kt:2
1 fun main() {
-> 2 println("Hello!")
3 }
@vvlevchenko
vvlevchenko / gist:b70bddd701f7356d0938b17438ba5105
Last active April 26, 2018 12:58
native-sample-with-bintray
diff --git a/cpp/binary-dependencies/build.gradle b/cpp/binary-dependencies/build.gradle
index 601f090..6941b9b 100644
--- a/cpp/binary-dependencies/build.gradle
+++ b/cpp/binary-dependencies/build.gradle
@@ -6,7 +6,7 @@ plugins {
repositories {
maven {
- url '../repo'
+ url 'https://dl.bintray.com/minamoto-test/kotlinx'
/Users/minamoto/ws/native-samples/cpp/simple-library/build/headers/cpp-api-headers.zip -> list
/Users/minamoto/ws/native-samples/cpp/simple-library/build/publications/main/pom-default.xml -> list
>>> missed: module.json
list-1.6.module module.json
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/minamoto/ws/native-samples/cpp/simple-library/build.gradle' line: 113
diff --git a/build.gradle b/build.gradle
index 674c8a7..a8b666c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,11 +1,15 @@
buildscript {
- ext.kotlin_version = '1.2.21'
+ ext.kotlin_version = '1.2.20'
repositories {
+ maven {