Skip to content

Instantly share code, notes, and snippets.

View yejiyang's full-sized avatar

Jiyang Ye yejiyang

  • NGI
  • Oslo, Norway
View GitHub Profile
@niclasmattsson
niclasmattsson / .Monotonic cubic splines with draggable Plotly points
Last active March 29, 2024 23:17
Monotonic cubic splines with draggable Plotly points
Nothing here, just a Gist hack to display the title correctly on Gist.
(Prefix the title of this file with a dot on Gist.)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 23, 2024 10:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@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
@wassname
wassname / read_zmapplus.py
Created June 8, 2014 21:45
python function to read zmap plus asci grid format
def read_zmapplusgrid(inputfile,dtype=np.float64):
"""Read ZmapPlus grids
Format is explained here http://lists.osgeo.org/pipermail/gdal-dev/2011-June/029173.html"""
# read header, read until second '@', record header lines and content
infile = open(inputfile,'r')
comments=[]
head=[]
a=0 # count '@'s
headers=0 # cound header+comment lines
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@mtigas
mtigas / gist:952344
Last active June 20, 2024 11:22
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@Sharpie
Sharpie / .vimrc
Created January 27, 2010 01:24
A vim profile file designed for editing Fortran source code
" Ensure correct syntax highlighting and auto-indentation for Fortran free-form
" source code.
let fortran_free_source=1
let fortran_do_enddo=1
filetype plugin indent on
syntax on
" Turn on line numbers and row/column numbers.
set nu