Skip to content

Instantly share code, notes, and snippets.

View zoltan-nz's full-sized avatar
😃
Zoltan is typing...

Zoltan zoltan-nz

😃
Zoltan is typing...
  • Victoria University of Wellington, ex-Worktango, ex-Westpac, ex-ANZ, ex-Vend/Lightspeed, ex-Sailthru, ex-Pro7Sat1, ex-DailyMail, ex-Sanoma
  • Toronto, Canada
  • 10:22 (UTC -04:00)
  • X @zoltan_nz
View GitHub Profile
@antoniomika
antoniomika / syncssh
Created February 16, 2022 20:30
syncssh
#!/bin/bash
starttmux() {
if [ -z "$HOSTS" ]; then
echo -n "Please provide of list of hosts separated by spaces [ENTER]: "
read HOSTS
fi
local hosts=( $HOSTS )
@nightire
nightire / debug_ember_app_in_vscode.md
Created May 17, 2018 11:21
How to debug an ember application with VS Code

Step 1: Launch Google Chrome with Remote Debugging support

  • windows: <path to chrome>/chrome.exe --remote-debugging-port=9222
  • macOS: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
  • linux: google-chrome --remote-debugging-port=9222

Step 2: Install "Debugger for Chrome" extension

Step 3: Setup your application

@enricofoltran
enricofoltran / main.go
Last active June 26, 2024 12:16
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@guilhermepontes
guilhermepontes / shuffle.js
Last active October 29, 2023 01:41
Shuffle Array - JavaScript ES2015, ES6
// original gist
const shuffleArray = arr => arr.sort(() => Math.random() - 0.5);
// fully random by @BetonMAN
const shuffleArray = arr => arr
.map(a => [Math.random(), a])
.sort((a, b) => a[0] - b[0])
.map(a => a[1]);
shuffleArray([1, 2, 3]) //[3, 1, 2]
anonymous
anonymous / ruby.md
Created January 12, 2017 09:35

Why I don't think Ruby is great

This post was inspired by this post on why the author thinks "Ruby is still great" and this tweet stating that Shopify (and others) are successful because of Rails, not despite it.

Now, let me first give a little background. I've been a Rails programmer since late 2006. Before Rails I went through PHP, ASP and ASP.NET (like most people at the time).

Back pre-2010, Rails was a force-multiplier, and to some degree still is. It provided a completely new way to do web development, including code generation and all the necessary tooling out of the box. The deployment story was sad until Heroku came on the scene, but we suffered through it because Rails solved a real problem.

After over 10 years of dealing with Rails' problems, I'm not so enthusiastic anymore. I believe it is impossible to write a high quality application in Rails. By high quality I mean it satis

@vasanthk
vasanthk / pagination.md
Created February 2, 2016 07:23 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@trabus
trabus / gist:8001480
Created December 17, 2013 07:49
Using Isotope.js with Ember.js
// Controller
App.SomeController = Ember.ArrayController.extend({
items: []
});
// View
App.SomeView = Ember.View.extend({
// this will be run once the didInsertElement event occurs, and any time an item is added
initIsotope: function(){
// use the run loop to execute after rendering is complete