Skip to content

Instantly share code, notes, and snippets.

@colorbox
colorbox / gist:0bd4adce021672de234ed7380b985584
Last active July 22, 2025 17:14
VoicePractice Privacy Policy
## Privacy Policy
color_box built the VoicePractice app as a Free app. This SERVICE is provided by color_box at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Ideamixier unless otherwise defined in this Privacy Policy.
@colorbox
colorbox / error.cpp
Last active July 20, 2024 15:21
https://leetcode.com/problems/reverse-linked-list/ にて、なぜかエラーになる。
/*
下記のようなエラーが出る。
```
Line 173: Char 16: runtime error: reference binding to misaligned address 0xbebebebebebec0b6 for type 'ListNode *', which requires 8 byte alignment (stl_deque.h)
0xbebebebebebec0b6: note: pointer points here
<memory cannot be printed>
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_deque.h:182:16
```
*/
@colorbox
colorbox / README.md
Last active October 14, 2021 16:00
納得いかないやつ
#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = (n)-1; i >= 0; i--)
#define rep1(i,n) for(int i = 1; i <= (n); i++)
#define rrep1(i,n) for(int i = (n); i > 0; i--)
#define ll long long
#define pi pair<int, int>
#define pll pair<ll, ll>
@colorbox
colorbox / challenge.rb
Last active September 29, 2019 06:30
def split_num(num)
("%04d" % num).split('').map(&:to_i)
end
def split_num_f(num)
split_num(num).map(&:to_f)
end
def twined(nums, symbols)
nums.zip(symbols).flatten.compact.map(&:to_s).join('')
@colorbox
colorbox / priority_queue.rb
Last active August 12, 2019 12:10
low number precedence
class PriorityQueue
attr_accessor :data
def initialize(arr=[])
@data = arr
end
def push(e)
@data.push(e)
eval File.read('doukaku.rb').scan(/gemfile do\n(.*?)\nend/m)[0][0]
@colorbox
colorbox / lazy_map.rb
Last active January 21, 2019 08:02
lazy確認
class Hoge
attr_accessor :body
def initialize(body)
@body = body
end
def squisher
pp "i squished #{@body}"
@body.squish
@colorbox
colorbox / curl request for post PR comment
Created December 28, 2018 15:38
PRのコメントを作成するcurlコマンド
curl -X POST -H "Content-Type: application/json" -H "Authorization: token <your GitHub token>" --data '{"commit_id":"8ae911bfd368794ba8955793faff475dcf0b81b7","body":"test","path":"app/models/space_include_ _file_name.rb","position":2}' https://api.github.com/repos/colorbox/kata/pulls/3/comments
@colorbox
colorbox / crop_image.rb
Created August 18, 2018 15:58
crop image with RMagick
require 'RMagick'
original = Magick::Image.read('original.jpg').first
image = original.crop(0, 0, 10, 10)
image.write('cropped.jpg')