Skip to content

Instantly share code, notes, and snippets.

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
import * as React from 'react';
import { DateTime } from 'luxon';
import { Calendar as CalendarIcon } from 'lucide-react';
import { Button } from '@/components/ui/Button';
import { Calendar } from '@/components/ui/Calendar';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/Popover';
import { cn } from '@/lib/utils';
import { SelectSingleEventHandler } from 'react-day-picker';
import { Label } from '@/components/ui/Label';
@mcandre
mcandre / elecraft-kx3-cheatsheet.md
Last active May 10, 2024 08:17
Elecraft KX3 Cheatsheet

Elecraft KX3 Cheatsheet

The KX3 transceiver is designed for HF amateur band operation. The KX3 natively supports 160m - 6m.

An optional 2m accessory can extend the band support to 2m, though the installation of that accessory is a more intensive, electronics hobbyist task.

WARNINGS

As with all radios, do not transmit when the antenna is disconnected. Avoid touching the antenna or feed line when transmitting. Power down the radio and disconnect the feed line when making antenna adjustments.

@straker
straker / README.md
Last active May 10, 2024 08:17
Basic Bomberman HTML and JavaScript Game

Basic Bomberman HTML and JavaScript Game

This is a basic implementation of the NES game Bomberman, but it's missing a few things intentionally and they're left as further exploration for the reader.

Further Exploration

  • Player death
  • The player should die when it is hit by an explosion from a bomb
@r2k0
r2k0 / sed_snippets.sh
Last active May 10, 2024 08:11
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file