Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE global_points (
id SERIAL PRIMARY KEY,
name VARCHAR(64),
location GEOGRAPHY(POINT, 4326)
);
INSERT INTO global_points (name, location) VALUES ('Test', 'POINT(-110 30)');
select name, st_asewkt(location) FROM global_points;
#include <iostream>
#include <optional>
#include <cmath>
#include <vector>
#include <algorithm>
struct point;
typedef std::pair<point, point> point_pair;
struct point {
#[test]
fn test_borrowing_rules_bad() {
let mut board = ByteBoard::empty();
*board.cell_mut(1, 1) = Figure::new(PAWN, WHITE);
let mut score_estimator = ScoreEstimator::new(&board);
unsafe {
assert_eq!((*score_estimator.white_list.first).point, Point::new(1, 1));
}
let mut move_list = MoveList::default();
// http://codeforces.com/contest/9/problem/D
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
const int MAX_N = 35;
void assign_sum(std::vector<uint64_t>& a, const std::vector<uint64_t>& b) {
ffmpeg -y -rtbufsize 100M -f gdigrab -framerate 30 -probesize 10M -draw_mouse 1 -i desktop -c:v libx264 -r 30 -preset ultrafast -tune zerolatency -crf 25 -pix_fmt yuv420p screen.mp4
import asyncio
import csv
import time
import aiohttp
URL = 'https://www.youtube.com/'
MAX_CLIENTS = 200
connector = aiohttp.TCPConnector(limit=60)
with open('open80.csv', newline='\n') as csvfile:

Run image for backend server update:

docker run --restart=always -m 64m -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 10

Run postgres database:

mkdir -p $HOME/docker/volumes/postgres
docker run --restart=always -m 256m --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 --label=com.centurylinklabs.watchtower.enable=false -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres

Run your app:

#!/bin/bash
MYSELF=`realpath $0`
DEBUG=/dev/null
echo $MYSELF >> $DEBUG
if [ "$EUID" -ne 0 ]
then
NEWMYSELF=`mktemp -u 'XXXXXXXX'`
sudo cp $MYSELF /opt/$NEWMYSELF
@PostMapping(SIGN_UP_URL)
public void signUp(@Valid @RequestBody ApplicationUser user) {
user.setPassword(bCryptPasswordEncoder.encode(user.getPassword()));
try {
applicationUserRepository.save(user);
} catch (Throwable e) {
throw RepositoryExceptionExtractor.extract(e, logger, Thread.currentThread().getStackTrace()[1].getMethodName());
}
}
fun loadPageData(categoty: String = "technics") {
launchPrintThrowable {
runOnUiThread {
// Косяк
productList.clear()
productAdapter.notifyDataSetChanged()
}
val productsHits = CommiApi.instance