Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / client.html
Last active January 10, 2024 01:15 — forked from crtr0/client.js
socket.io nodejs snippets
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.3/socket.io.js"
integrity="sha512-jDUVpk2awjMnyrpY2xZguylQVRDeS9kRBImn0M3NJaZzowzUpKr6i62ynwPG0vNS1+NsTk4ji+iznbc5m0ZCKQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@jrichardsz
jrichardsz / convertSheet2Json.gs
Last active January 4, 2024 13:09 — forked from daichan4649/convertSheet2Json.gs
spreadsheet as json api using Google Apps Script
/* Source: https://gist.github.com/daichan4649/8877801 */
function doGet(e) {
//tab name in sheet
var sheetName = "Sheet 1";
//key in url of document
var sheetId = "1234...";
var book = SpreadsheetApp.openById(sheetId);
var sheet = book.getSheetByName(sheetName);
@jrichardsz
jrichardsz / ClassScanner.java
Last active November 28, 2023 15:26 — forked from skempken/Detector.java
Find all annotated classes in a package using Spring
import java.lang.annotation.Annotation;
import java.util.LinkedList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.web.context.support.StandardServletEnvironment;
@jrichardsz
jrichardsz / assert.js
Last active November 1, 2023 16:03 — forked from bebraw/assert.js
Chaining assert statement for JavaScript
var assert = function(stmt) {
var methods = {
equals: {
error: function(val) {
return val + ' did not equal ' + stmt + '!'
},
method: function(val) {
return val == stmt;
}
},
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@jrichardsz
jrichardsz / emoji icon emoticon github markdown .md
Last active August 24, 2023 17:26 — forked from rxaviers/gist:7360908
emoji icon emoticon github markdown

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jrichardsz
jrichardsz / private-docker-regs-with-free-tiers.markdown
Last active July 22, 2023 17:29 — forked from JakubOboza/private-docker-regs-with-free-tiers.markdown
Private Docker registry with free tiers for Developers, docker registry, docker host, dockerregistry
@jrichardsz
jrichardsz / API.md
Last active July 20, 2023 15:03 — forked from iros/API.md
Documenting your REST API, api docs, apidocs, restdocs, http spec, documentation, wiki

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: