Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / PerformBuild.cs
Created March 29, 2021 05:11 — forked from dholdaway/PerformBuild.cs
Automated Unity Build from git repository to apk, xcode projects for use in conjunction with Jenkins. Contains Unity Editor script to collect the scenes, set the build settings, set the build location and an ant script to build the Unity project on the command line.
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
private static string BUILD_LOCATION = "+buildlocation";
@jrichardsz
jrichardsz / index.html
Created March 10, 2021 22:51 — forked from revskill10/index.html
D3.js drawing nodes and links from json structure
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>tags</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="d3.v2.min.js"></script>
@jrichardsz
jrichardsz / list-files-in-folder.js
Created March 9, 2021 04:47 — forked from hubgit/list-files-in-folder.js
List all files in a folder (Google Apps Script)
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();
@jrichardsz
jrichardsz / submit.md
Last active November 1, 2022 18:17 — forked from tanaikech/submit.md
nodejs snippert Multipart-POST Request Using Node.js multipart/form-data

Multipart-POST Request Using Node.js

Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack.

Sample script 1:

  • You can upload the zip file by converting byte array as follows.
    • At first, it builds form-data.
    • Adds the zip file converted to byte array and boundary using Buffer.concat().
    • This is used as body in request.
// ==UserScript==
// @name ReplaceURLs(GoogleImages)
// @namespace http://ashiato1.blog62.fc2.com/
// @description Replace URLs with orig image
// @author tomato111
// @version 0.0.8
// @downloadURL https://gist.github.com/tomato111/681d634ded1a9bd3107e2baf60460a35/raw/ReplaceURLs(GoogleImages).user.js
// @updateURL https://gist.github.com/tomato111/681d634ded1a9bd3107e2baf60460a35/raw/ReplaceURLs(GoogleImages).user.js
// @include https://www.google.*/search?*tbm=isch*
// @include https://www.google.*/search?*tbs=sbi*
@jrichardsz
jrichardsz / http_https_nginx.conf
Last active January 2, 2021 05:26 — forked from unixcharles/nginx.conf
nginx config for http and https proxy
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@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 / setenv.sh
Last active December 2, 2020 22:13 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@jrichardsz
jrichardsz / vimeo-downloader.js
Created September 23, 2020 15:34 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
@jrichardsz
jrichardsz / test_results.html
Created August 27, 2020 18:15
A nice HTML test results report template
<html>
<head>
<title>
Test Report
</title>
<style type="text/css">
.test-result-table {
border: 1px solid black;