Skip to content

Instantly share code, notes, and snippets.

View wandonye's full-sized avatar

Danny Wang wandonye

View GitHub Profile
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active June 6, 2025 15:12
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@xavierpriour
xavierpriour / build.sh
Created May 7, 2018 15:01
meteor-in-docker production - build script
#!/usr/bin/env bash
#
# Builds the docker image used in deployments.
# - embedding most files inside the image
# - turning on compilation and optimization
# - this requires the dev image as a tool (will pull it if not already available)
#
# This WILL wipe out any previous build and replace with a new one
# fetch build info to embed in the image
@biggzlar
biggzlar / cuda_installation_on_ubuntu_18.04
Last active March 7, 2021 16:03 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
tensorflow-gpu and nvidia rtx 2060 / 2070 / 2080
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@cgmb
cgmb / CMakeLists.txt
Last active April 18, 2025 01:57
Setup ROCm on a G4ad instance
cmake_minimum_required(VERSION 3.16)
project(example LANGUAGES CXX)
find_package(hip REQUIRED)
add_executable(example main.cpp)
target_link_libraries(example PRIVATE hip::device)