This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://api.github.com/repos/gogs/gogs/releases/latest \ | |
| grep "linux_amd64.*zip" \ | |
| cut -d : -f 2,3 \ | |
| tr -d \" \ | |
| wget -qi - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.full { | |
background: #2E313E | |
} | |
.hljs { | |
display: block; | |
overflow-x: auto; | |
padding: 0.5em; | |
background-color: #2b2b2b !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import PouchDB from 'pouchdb'; | |
var PouchDB = require('pouchdb'); | |
PouchDB.plugin(require('pouchdb-quick-search')); | |
class Database { | |
db: any; | |
constructor(databaseName: string) { | |
this.db = new PouchDB(databaseName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
class DrStrange { | |
private static List<Integer> numbers; | |
public DrStrange() { | |
numbers = new ArrayList<>(); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from fontTools.ttLib import TTFont | |
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable | |
font = TTFont('whitney.ttf') | |
cmap = font['cmap'] | |
t = cmap.getcmap(3,1).cmap | |
s = font.getGlyphSet() | |
units_per_em = font['head'].unitsPerEm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in p*.[jJ][pP][gG] | |
do | |
echo $f | |
convert $f -resize 1024x683^ -gravity center -extent 1024x683 print_$f | |
done | |
# resizes all jpgs in a dir to 1024x683 px with gravity centered:wq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# A tiny webserver in python | |
# ready to run! | |
import os | |
import configparser | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var cssStuff = ""; | |
function addGlobalStyle(css) { | |
cssStuff += css + "\n"; | |
} | |
function loadGlobalStyle(css) { | |
var html, style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nio | |
channels: | |
- conda-forge | |
- defaults | |
dependencies: | |
- boost-cpp=1.72.0=hdf9ef73_0 | |
- bzip2=1.0.8=h0d85af4_4 | |
- c-ares=1.18.0=h0d85af4_0 | |
- ca-certificates=2021.10.8=h033912b_0 | |
- cairo=1.16.0=hec6a9b0_1003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collection; | |
import org.apache.commons.math3.optim.MaxIter; | |
import org.apache.commons.math3.optim.PointValuePair; | |
import org.apache.commons.math3.optim.linear.LinearConstraint; | |
import org.apache.commons.math3.optim.linear.LinearConstraintSet; | |
import org.apache.commons.math3.optim.linear.LinearObjectiveFunction; | |
import org.apache.commons.math3.optim.linear.NonNegativeConstraint; | |
import org.apache.commons.math3.optim.linear.Relationship; |
OlderNewer