Skip to content

Instantly share code, notes, and snippets.

View buncis's full-sized avatar
❤️
(づ。◕‿‿◕。)づ

buncis buncis

❤️
(づ。◕‿‿◕。)づ
View GitHub Profile
@buncis
buncis / demo1.html
Last active March 4, 2020 15:12
D3 cluster sample, kalo error ganti url.csv ke url raw baru
<!-- Code from d3-graph-gallery.com -->
<!DOCTYPE html>
<meta charset="utf-8" />
<!-- Load d3.js -->
<script src="https://d3js.org/d3.v4.js"></script>
<!-- Create a div where the graph will take place -->
<div id="my_dataviz"></div>
@buncis
buncis / readme.md
Created January 30, 2020 18:18
VENV SETUP

setup

python3 -m venv venv

run

export FLASK_APP=hello.py flask run --host=0.0.0.0

@buncis
buncis / readme.md
Created January 30, 2020 18:18
VENV SETUP

setup

python3 -m venv venv

run

export FLASK_APP=hello.py flask run --host=0.0.0.0

@buncis
buncis / crud.dart
Last active April 23, 2019 08:29
dart async crud
Future<List<Post>> _getPosts() async {
final url = 'http://192.168.0.19:3000/posts';
final response = await http.get(
url,
headers: {
"Content-Type": "application/json",
},
);
if (response.statusCode == 200) {
return new List<Post>.from(
@buncis
buncis / how_to_enable_uuid_on_rails.md
Created April 20, 2019 16:57
enable uuid on rails & postgresql
rails generate migration enable_pgcrypto_extension
class EnablePgcryptoExtension < ActiveRecord::Migration[5.1]
  def change
    enable_extension 'pgcrypto'
  end
end
@buncis
buncis / main.dart
Last active March 19, 2019 09:16
way to send state to parent flutter
https://www.youtube.com/watch?v=RS36gBEp8OI&feature=youtu.be
make the state and amethod that change it in parent
->
send the method that manipulate state to children
->
children then call the method
@buncis
buncis / gist:92b9f60a75a9bf93c966a621f7400055
Created February 9, 2019 14:30
ruby on rails in bash on ubuntu
cd /mnt/$yourdrivealphabet
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: username in postgres windows
password: pass in postgres windows
@buncis
buncis / rainbow.css
Last active December 30, 2018 11:33
rainbow colorgraph
.colorgraph {
height: 5px;
border-top: 0;
background: #c4e17f;
border-radius: 5px;
background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4);
background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%,
@buncis
buncis / colab_download.py
Created August 5, 2018 13:41 — forked from korakot/colab_download.py
Google colab file upload/download
files.download('example.txt') # from colab to browser download
@buncis
buncis / s3 bucket sync
Last active August 1, 2018 14:58
s3 bucket sync
aws s3 source tujuan
example
aws s3 sync s3://mybucket .
output
download: s3://mybucket/test.txt to test.txt
download: s3://mybucket/test2.txt to test2.txt