Skip to content

Instantly share code, notes, and snippets.

View flavienbwk's full-sized avatar

Flavien Berwick flavienbwk

  • Montréal, Canada
  • 18:11 (UTC -04:00)
View GitHub Profile
@prashanthrajagopal
prashanthrajagopal / mirror_sync_cron.sh
Last active December 8, 2019 01:38
Sync Ubuntu Mirror v1
### Admin email address
admin_email=admin@domain.com
### Setup the server to mirror
mirror=rsync://archive.ubuntu.com/ubuntu
### Log file path
log=/var/log/ubuntu
### Setup the local directory
@francoisruty
francoisruty / script.sh
Created June 29, 2019 14:41
Deep learning on Shadow PC
# Run those commands:
conda update conda
conda update anaconda
conda update python
conda update –all
conda create –name tf-gpu
cmd
activate tf-gpu
conda install -c aaronzs tensorflow-gpu #(note: this channel proposes a recent Tensorflow binary for windows)
conda install -c anaconda cudatoolkit
@fer-ri
fer-ri / background-image.ts
Created May 24, 2016 06:33
Background Image Style Directive for Angular 2 and Ionic 2
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({
selector: '[background-image]'
})
export class BackgroundImage {
private el: HTMLElement;
constructor(el: ElementRef) {
this.el = el.nativeElement;
@joenas
joenas / matrix_synapse.nginx.conf
Last active May 14, 2021 16:53
Nginx example conf for Synapse matrix Homeserver
# vim: syntax=nginx
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
@yarl
yarl / geoportal-tms.php
Created January 2, 2014 18:32
Geoportal WMS to TMS conversion.
<?php
$zoom = htmlspecialchars($_GET["zoom"]);
$x = htmlspecialchars($_GET["x"]);
$y = htmlspecialchars($_GET["y"]);
//explanation: https://gist.github.com/tmcw/4954720
$y = pow(2, $zoom)-$y-1;
//source: https://github.com/timwaters/whoots/blob/master/whoots.rb
@erikyo
erikyo / Max_Dissolved_Oxigen.c
Created May 8, 2018 20:25
Max Dissolved Oxigen Saturation over a range of user-specified values for water temperature, barometric pressure, and salinity or specific conductance.
// --------- Max Dissolved Oxigen Saturation ------------//
//
// Equation for the Henry coefficient as a function of temperature and salinity is used to calculate values
// for unit standard atmospheric concentrations (USAC) in freshwater and seawater in equilibrium with air at a total pressure
// of 1 atmosphere. It is estimated that the possible error in the new USAC values is no greater than $\pm 0.1%$ and probably less.
// Tables and equations are presented for obtaining accurate USAC values in the ranges $0^\circ < t < 40^\cir C and 0 < S < 40$.
// Simple procedures are given for calculating standard atmospheric concentrations at pressures different from 1 atm.
//
// Reference https://water.usgs.gov/software/DOTABLES/
// Dissolved oxygen (DO) solubility over a range of user-specified values for
@deekayen
deekayen / .gitlab-ci.yml
Created August 3, 2020 21:19
Build a Docker container and then scan it with Quay Clair.
clair:
tags:
- kubernetes
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
## Define two new variables based on GitLab's CI/CD predefined variables
## https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables
#!/bin/bash
# Fixes a downloaded apt mirror
# See: https://github.com/apt-mirror/apt-mirror/issues/113#issuecomment-464932493
## first parameter is optional mirror list file
if [ "$1" != "" ]
then
mirrorlist=$1
else
@sameersbn
sameersbn / gitlab.conf
Created February 6, 2015 09:53
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;
@helmasaur
helmasaur / license-badges.md
Last active March 1, 2022 16:49 — forked from lukas-h/license-badges.md
Badges de licence pour vos projet

Badges de licence en Markdown

Collection de badges de licence pour le fichier README de vos projets. Copiez-collez facilement le code dessous les badges dans vos fichier au format Markdown.

Notes

  • Les badges sont réalisé avec Shields.io.
  • Ces badges ne remplacent pas les informations concernant vos projets. Il s'agit seulement d'images pour le fichier README afin que les utilisateurs voient en un coup d'œil la licence choisie.

Vous souhaitez qu'une licence soit ajoutée ?

Commentez ce gist ou contactez le créateur du gist original via un commentaire ou via courriel (lukas@himsel.me)