Skip to content

Instantly share code, notes, and snippets.

View Edditoria's full-sized avatar
🎯
asdf-hugo

Edditoria Edditoria

🎯
asdf-hugo
View GitHub Profile
@cgsdev0
cgsdev0 / house_builder.sh
Created February 3, 2024 16:07
house builder pattern in bash
#!/usr/bin/env bash
function house_builder() {
# floors,rooms,has_garage
echo "0,0,0"
}
function set_field() {
local f r g
IFS=, read f r g
import Foundation
public enum Method: String {
case GET
case POST
case PUT
case PATCH
case DELETE
}
@mendhak
mendhak / update-another-users-pullrequest.md
Last active July 26, 2023 07:35
Update a pull request by pushing to another user's forked repository

Add the other user as a remote

#Using https
git remote add otheruser https://github.com/otheruser/yourrepo.git
# Or - Using SSH
git remote add otheruser git@github.com:otheruser/yourrepo.git

Fetch

git fetch otheruser

@obonyojimmy
obonyojimmy / active-window.go
Created January 1, 2017 02:50
Go lang get current foreground window
package main
import (
"fmt"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
var (
@HaleTom
HaleTom / print256colours.sh
Last active April 14, 2024 13:35
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@nathan-osman
nathan-osman / win32.go
Last active August 31, 2023 22:01
Simple Windows GUI application written in Go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")

Meteor Alternatives Per Feature

This table was created in 2015 so may be quite outdated today.

Feature Meteor Solution Alternative Solutions Description
Live DB Sync [livequery][lq] ([mongo-oplog]), [ddp] RethinkDB, Redis, ShareDB, [npm:mongo-oplog], [firebase], etc. Push DB updates to client/server.
Latency Compensation, Optimistic UI [minimongo][mm] [RethinkDB][lcr], [mWater/minimongo] (fork, not ws but http, browserify) Imitate successful db query on client before it is done.
Isomorphic Code [isobuild] & isopacks browserify Write one code for server/client/mobile.
Isomorphic Packaging [isobuild], atmosphere No more separate packages for server & client. Get bower + npm + mobile.

Git Cheat Sheet

Commands

Getting Started

git init

or

專案名稱: Rails新手村網站

主旨:收集 Rails 有用 Link

基本功能