Skip to content

Instantly share code, notes, and snippets.

@JemCdo
JemCdo / columns_cheat_sheet.md
Created September 25, 2019 16:10 — forked from alphaolomi/columns_cheat_sheet.md
Laravel Migration Cheat Sheet

Columns

Available Column Types

The schema builder contains a variety of column types that you may specify when building your tables:

The schema builder contains a variety of column types that you may specify when building your tables:

Command` Description
$table->bigIncrements('id'); Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column.
$table->bigInteger('votes'); BIGINT equivalent column.
@GAS85
GAS85 / aria2c_webUI.md
Last active May 4, 2024 17:32
Aria2 + Ubuntu 18.04 + Apache2 + Web UI
OS: Ubuntu 18.04 Apache/2.4.18 1.0.2g-1ubuntu4.10
Aim: to install Aria2 with WebUI and secure Token.
IP Addr of your Aria2 server is 192.168.0.111
Your local IP network is 192.168.0.0/24

Aria 2

1. Installation

Install aria2 package:

// BENCH
const NEW_TEMPLATE_INPUT: &str = r#"{"e":"depthUpdate","E":1571889248277,"T":1571889248276,"s":"BTCUSDT","U":390497796,"u":390497878,"pu":390497794,"b":[["7403.89","0.002"],["7403.90","3.906"],["7404.00","1.428"],["7404.85","5.239"],["7405.43","2.562"]],"a":[["7405.96","3.340"],["7406.63","4.525"],["7407.08","2.475"],["7407.15","4.800"],["7407.20","0.175"]]}"#;
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Deserialize using serde", |b| {
b.iter(|| {
let _: BBO =
serde_json::from_str(NEW_TEMPLATE_INPUT).expect("Failed to deserialize JSON");
})
@SingingBush
SingingBush / godot-fedora.md
Created April 1, 2018 01:25
setting up Godot on Fedora Linux

Godot 3.0.2 (Mono Version)

Get the latest Mono

Godot requires Mono 5.4.x but the Fedora repo is still stuck on an older version. Install the latest directly from the Mono Project (currently 5.10.x).

http://www.mono-project.com/download/stable/#download-lin

rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
@kitschysynq
kitschysynq / gist:867caebec581cee4c44c764b4dd2bde7
Created April 10, 2017 13:45
List running qemu instances with nicely formatted output
ps -ef | awk -e '/qemu/ && !/awk/' | sed -e 's/[^/]*//' -e 's/ -/\n\t-/g'
@xameeramir
xameeramir / default nginx configuration file
Last active May 4, 2024 17:27
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@Restioson
Restioson / Readme.md
Last active May 4, 2024 17:27
[Obsidian] Search through your Fantasty Statblocks bestiary by CR/type

Monster Search

Search through your Fantasty Statblocks bestiary by monster CR and type, using Dataview!

image

How to add

  1. Make sure that Meta-Bind, Fantasy Statblocks, Dataview and is installed
@sfider
sfider / DataGameViewportClient.cpp
Last active May 4, 2024 17:26
UE4 Pixel Perfect GameViewportClient
#include "DataGameViewportClient.h"
#include "Engine.h"
#include "Engine/LocalPlayer.h"
#include "SceneView.h"
constexpr int RENDER_WIDTH = 320;
constexpr int RENDER_HEIGHT = 180;
UDataGameViewportClient::UDataGameViewportClient(FVTableHelper& Helper)
: Super(Helper)
@eggbean
eggbean / install_golang.sh
Last active May 4, 2024 17:23
Script for automated installation or updating Go. For Linux and macOS, x86_64, arm64 and arm.
#!/bin/bash -e
# This script installs or updates to the latest version of Go.
# Multi-platform (Linux and macOS)
# Multi-architecture (amd64, arm64, arm) support
#
# Add to your .profile, .bash_profile or .zshenv:
# export PATH=$PATH:/usr/local/go/bin
error_string=("Error: This command has to be run with superuser"