Skip to content

Instantly share code, notes, and snippets.

@korakotlee
korakotlee / PRIVACY_POLICY.md
Created August 8, 2026 18:33
KoStock App Privacy Policy

Privacy Policy for KoStock

Effective Date: August 8, 2026

KoStock ("we", "our", or "us") is committed to protecting your privacy. This Privacy Policy explains how KoStock operates and handles user information.

1. Information Collection and Use

KoStock is built as an offline-first educational game and stock trading simulator.

  • No Personal Data Collection: We do not collect, store, or transmit any personally identifiable information (such as your name, email address, phone number, or location).
  • No Account Required: You can use KoStock without creating an account or providing any credentials.
Odoo Server Error
Traceback (most recent call last):
File "/home/korakot/apps/printedmint/pm2/odoo/addons/base/models/ir_ui_view.py", line 640, in apply_inheritance_specs
source = apply_inheritance_specs(source, specs_tree,
File "/home/korakot/apps/printedmint/pm2/odoo/tools/template_inheritance.py", line 229, in apply_inheritance_specs
raise ValueError(
ValueError: Element '<xpath expr="//div/div/div[2]">' cannot be located in parent view
# lib/tasks/some_task.rake
require 'profiler'
namespace :some_task do
task :apple do
# byebug
Profiler::prof("import") do
# Your slow code here
sleep 2
# lib/profiler.rb
class Profiler
def self.prof(file_name)
RubyProf.start
yield
results = RubyProf.stop
@korakotlee
korakotlee / rover.rb
Created July 18, 2019 17:48
Ruby Mars Rover
class Rover
# attr_reader :x, :y, :direction
def initialize(x, y, dir)
@x = x
@y = y
@dir = dir
end
def to_s
puts "#{@x} #{@y} #{@dir}"
@korakotlee
korakotlee / bubblesort.rb
Created July 8, 2019 15:43
ruby bubble sort
def bubble_sort(list)
return list if list.size <= 1
loop do
sorted = true
index_right = 2
0.upto(list.size-index_right) do |i|
if list[i] > list[i+1]
list[i], list[i+1] = list[i+1], list[i]
sorted = false
end
@korakotlee
korakotlee / insertion_sort.rb
Created July 8, 2019 15:23
ruby insertion sort
def insertion_sort(array)
final = []
final << array.shift
for i in array
final_index = 0
while final_index < final.length
if i <= final[final_index]
final.insert(final_index,i)
break
elsif final_index == final.length-1
@korakotlee
korakotlee / quicksort.rb
Created July 6, 2019 02:36
ruby quicksort
def quicksort(a, first, last)
if first < last
p_index = partition(a, first, last)
quicksort(a, first, p_index-1)
quicksort(a, p_index+1, last)
end
return a
end
def partition(a, first, last)
@korakotlee
korakotlee / ChatHeadService.java
Created April 30, 2019 13:27
ChatHeadService for Flutter platform channel
package com.korakotlee.korspeed;
import android.app.Service;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.os.IBinder;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@korakotlee
korakotlee / LocationPlugin.java
Created April 30, 2019 13:19
LocationPlugin for Flutter
package com.lyokone.location;
import android.Manifest;
import android.app.Activity;
import android.provider.Settings;
import android.content.IntentSender;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationManager;