Skip to content

Instantly share code, notes, and snippets.

@JBlond
JBlond / bash-colors.md
Last active May 10, 2024 08:31 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 10, 2024 08:31
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@real-jiakai
real-jiakai / ssh-snippets.md
Last active May 10, 2024 08:31
ssh工具代码脚本片段

1、debian、ubuntu更新并升级软件包

apt update && apt upgrade -y

2、docker compose重新部署

docker compose down && docker compose up -d
@nikAizuddin
nikAizuddin / Podman Installation on OpenSUSE Tumbleweed WSL2.md
Created February 25, 2023 05:56
Podman Installation on OpenSUSE Tumbleweed WSL2

Podman Installation on OpenSUSE Tumbleweed WSL2

Make sure all packages up-to-date:

sudo zypper dup

Restart OpenSUSE by executing the following command using Powershell:

wsl --shutdown openSUSE-Tumbleweed
import com.ning.http.client.*;
import jenkins.plugins.asynchttpclient.*;
import com.cloudbees.jenkins.plugins.assurance.model.*;
import org.apache.commons.lang.*;
ProxyServer proxy = AHCUtils.getProxyServer()
if (proxy != null) {
println proxy.getHost()
println proxy.getPort()
@coolsam726
coolsam726 / PrimeDatatables.vue
Last active May 10, 2024 08:28
A fully functional Vue component to work with savannabits/primevue-datatables package (Works with tailwindcss and Vue.js 3.x). NB: The usage example is based on savannabits/acacia, a backend generator I developed to make your life easier by generating code for the backend CRUDs. You can flesh out the unnecessary parts to remain with the bare-bon…
<template>
<DataTable
class="p-datatable-sm"
:value="records"
:lazy="true"
:auto-layout="true"
:paginator="true"
:rows="10"
v-model:filters="filters"
ref="dt"
@ericksli
ericksli / Calendar Template.html
Created October 17, 2018 05:19
Google Apps Script create calendar events
<b>英文名:</b> <?= enTitle ?>
<br><b>中文名:</b> <?= zhTitle ?>
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@tuto1902
tuto1902 / chatbox.blade.php
Last active May 10, 2024 08:19
Livewire Chat Box Component
<?php
use App\Events\MessageSent;
use Livewire\Volt\Component;
new class extends Component
{
/**
* @var string[]
*/
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: test
spec:
replicas: 1
template:
metadata:
creationTimestamp: null