Skip to content

Instantly share code, notes, and snippets.

View mikoscz's full-sized avatar
👋

Michał Staśkiewicz mikoscz

👋
View GitHub Profile
@mikoscz
mikoscz / adapter.js
Created November 19, 2021 10:47
ember_example_supabase_adapter
import Adapter from '@ember-data/adapter';
import { createClient } from '@supabase/supabase-js';
const DB_URL = '';
const ANON_KEY = '';
export default class TodoAdapter extends Adapter {
supabase = createClient(DB_URL, ANON_KEY);
async findRecord(_store, _type, id) {
{
"Ember": {
"prefix": ["E:Ember"],
"body": ["import Ember from \"ember\""],
"description": "Ember's Ember"
},
"Application": {
"prefix": ["E:Application"],
"body": ["import Application from \"@ember/application\""],
"description": "Ember's Application"
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
cl_crosshairalpha "200"
cl_crosshaircolor "5"
cl_crosshaircolor_b "255"
cl_crosshaircolor_r "255"
cl_crosshaircolor_g "255"
cl_crosshairdot "0"
cl_crosshairgap "0"
cl_crosshairsize "5"
cl_crosshairstyle "4"
cl_crosshairusealpha "1"
@mikoscz
mikoscz / elixir_with_asdf_mac.md
Last active October 25, 2021 12:56
Install elixir with asdf-vm mac os
  1. brew install asdf
echo -e '\n. $(brew --prefix asdf)/asdf.sh' >> ~/.zshrc
echo -e '\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash' >> ~/.zshrc
brew install \
 coreutils automake autoconf openssl \
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
1. Write a JavaScript function to get all prime numbers from 0 to a 250;
2. Write a JavaScript program to find the area of a triangle where lengths of the three of its sides are a, b, c - where abc are configurable variables.
3. Write a JavaScript code that prints triangle based on 'size' variable. Size represents the last line of triangle.
#
### - triangle with size 5
#####
@mikoscz
mikoscz / recipes.js
Created October 21, 2017 14:56
Ember - recipes stored in localStorage
import Service from '@ember/service';
import { computed } from '@ember/object';
export default Service.extend({
init() {
this._super(...arguments);
if (!localStorage.getItem('recipes')) {
localStorage.setItem('recipes', '[]');
}
settings