Skip to content

Instantly share code, notes, and snippets.

Enjoying life, including work.

Balint Erdi balinterdi

Enjoying life, including work.
Block or report user

Report or block balinterdi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
balinterdi / application.hbs
Last active Jan 23, 2020
Refresh a route's @model – this one re-renders the template with the new song
View application.hbs
<div class="h-screen w-full bg-blue-800 text-gray-100">
<div class="w-full xl:w-1/3 mx-auto">
<div class="h-12 flex items-center mb-4 border-b-2">
<h1 class="font-bold text-2xl">Rock & Roll <span class="font-normal">with Ember.js</span></h1>
<div class="w-full">
<div class="">
{{#each @model as |song|}}
View IconArrow.svelte
export let fill;
export let stroke;
export let strokeWidth;
export let rotation;
<svg viewBox="0 0 24 24" class="w-6" xmlns="">
d="m11 14.59v-7.59a1 1 0 0 1 2 0v7.59l2.3-2.3a1 1 0 1 1 1.4 1.42l-4 4a1 1 0 0 1 -1.4 0l-4-4a1 1 0 0 1 1.4-1.42z"
balinterdi / bubblesort.lua
Created Jul 12, 2019
A highly efficient bubble sort algorithm in Lua
View bubblesort.lua
function print_array(a)
local i = 1
while a[i] do
i = i + 1
function bubblesort(t)
local swapsMade;
balinterdi / ember-font-awesome.ts
Last active Jul 3, 2019
First stab at Embroider compat-adapter for ember-font-awesome
View ember-font-awesome.ts
import V1Addon from '../v1-addon';
import { AddonMeta } from '@embroider/core';
export default class EmberFontAwesome extends V1Addon {
get packageMeta(): Partial<AddonMeta> {
let meta = super.packageMeta;
meta['public-assets'] = {
'node_modules/font-awesome/fonts/FontAwesome.otf': '/fonts/FontAwesome.otf',
for (let extension of ['eot', 'svg', 'ttf', 'woff', 'woff2']) {
balinterdi / application.js
Created Jul 3, 2019
Setting document title in the application route
View application.js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default Route.extend({
currentUser: service(),
router: service(),
init() {
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAnMnNV3Wonaxa0BHY5gTelsUpet1qRfEhzJUGN04tD1gXXAZnF+iDBQcw7g7600MS0OsXbiquQYiyqEhnnLpUv4fMmN+aEoqh20+smU6iKbHN2RwXwb7NRQ6kzHyQD+QC+/6MJjOsdjCibLmljMwGUh1MKw+AQ248cooSJdpHKqs=
View ethers
balinterdi / copy-text-to-clipboard.js
Created Jul 27, 2017
Copy some text to the clipboard using the brower's DOM API
View copy-text-to-clipboard.js
export default function copyTextToClipboard(text) {
let textArea = document.createElement("textarea");
textArea.value = text;
try {
// Now that we've selected the anchor text, execute the copy command
let successful = document.execCommand('copy');
let message = successful ? 'successful' : 'unsuccessful';
balinterdi / settings.json
Created May 26, 2017
My VSCode configuration
View settings.json
"window.zoomLevel": 1,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/tmp": true,
"node_modules": true, // this excludes the folder
// only from the root of
// your workspace
"tmp": true,
balinterdi / router.js
Created Apr 25, 2017
Log in in a modal (lightbox), without the page "underneath" disappearing
View router.js {
this.route('about-us', function() {
this.route('login', { path: '/' }); // or you can even have a different path if you don't mind the URL change
You can’t perform that action at this time.