Skip to content

Instantly share code, notes, and snippets.

View bluemix's full-sized avatar
🖐️
Hello There :D

Abdulmomen Bsruki bluemix

🖐️
Hello There :D
View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@bistaray
bistaray / odoo_install.sh
Last active April 15, 2022 02:51
Install Odoo v10 Enterprise (with Bista repositories)
#!/bin/bash
################################################################################
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04
# Author: Yenthe Van Ginneken
# Adjusted: Ray Carnes
# Assumes you already have an Ubuntu user called "odoo" with a home folder
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh
# Place this content in it and then make the file executable:

Using Swift Package Manager with iOS

Step 1:

File > New > Project...

Step 2:

Create a Package.swift file in your root project directory, add dependencies, then run swift package fetch on the command line in the same directory. We’re not going to run swift build because it will just complain.

@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active December 23, 2024 15:56 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active January 9, 2025 12:22
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@jaredhowland
jaredhowland / clear-font-cache.md
Last active November 6, 2024 14:41
Clear Mac OS X Font Caches
@AquaGeek
AquaGeek / Rx.swift
Last active February 6, 2017 11:27
RxSwift
// Retry with backoff
// Adapted from http://blog.danlew.net/2016/01/25/rxjavas-repeatwhen-and-retrywhen-explained/
Observable
.range(start: 1, count: 10)
.doOn(onNext: { i in
if i == 5 {
throw NSError(domain: "com.example", code: 1, userInfo: ["any": "thing"])
}
})
.retryWhen { (attempts: Observable<ErrorType>) -> Observable<Int64> in
@lsurvila
lsurvila / DownloadFileWithRetrofit2RxJava.java
Last active August 12, 2024 07:37
Download file with Retrofit 2, OkHttp, Okio and RxJava
import com.squareup.okhttp.ResponseBody;
import okio.BufferedSink;
import okio.Okio;
import retrofit.Response;
import retrofit.http.GET;
import retrofit.http.Query;
import rx.Observable;
interface ApiService {
@andrius-preimantas
andrius-preimantas / ir.actions.server.py
Created December 4, 2015 13:31
Odoo server action to recompute stored fields
# Recompute amount_total for account.invoice
env.add_todo(model._fields['amount_total'], object)
model.recompute()
# where
# object - recordset of instances to recompute field for
# model - recordset instances model
@moriyoshi
moriyoshi / app.ini
Last active November 4, 2019 06:41
run it with `gunicorn --paste app.ini`
[app:main]
use = call:server:paster_main
[server:main]
use = egg:gunicorn#main
host = 0.0.0.0
port = 8000
workers = 1