Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / vimeo-downloader.js
Created Oct 3, 2021 — forked from alexdrean/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
View vimeo-downloader.js
// 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>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');
@jrichardsz
jrichardsz / download google drive public file.md
Created Oct 1, 2021 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl, downloaddrive
View download google drive public file.md

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
@jrichardsz
jrichardsz / _InbentaApiMethods.md
Created Jul 19, 2021 — forked from jalcantarab/_InbentaApiMethods.md
Google App Script Examples of some of the Inbenta API endpoints
View _InbentaApiMethods.md

Inbenta API - Google Apps Script Examples (~JavaScript)

Check out the official documentation of the Inbenta API at Getting Started. This gist is done for API version v1. To check out SDK examples in JavaScript, check this out

Overview

All the API access is over HTTPS. The response format for all requests is a JSON object. Whether a request succeeded is indicated by the HTTP status code. A 2xx status code indicates success, otherwise failure. When a request fails, the response body is still JSON.

Authentication

Authentication is done via HTTP headers, more information in the Authorization section. The calls in this gist all authenticate doing a call to getApiData(), which retrieves a token from POST /auth, and the list of api endpoints from GET /apis.

View pageant-autoload-keys-at-startup.txt
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@jrichardsz
jrichardsz / oracle copyfile.plsql
Created Apr 24, 2021 — forked from Tryptich/copyfile.plsql
copy file in oracle, utl_file.fcopy doesn't work for some type of file and the only way to copy a file is to do it as raw file. So here is an example.
View oracle copyfile.plsql
CREATE OR REPLACE PROCEDURE copyfile (in_director in varchar2, in_filename IN VARCHAR2, out_directory in varchar2, out_filename IN VARCHAR2)
IS
in_file UTL_FILE.file_type;
out_file UTL_FILE.file_type;
buffer_size CONSTANT INTEGER := 32767; -- Max Buffer Size = 32767
buffer RAW (32767);
buffer_length INTEGER;
BEGIN
-- Open a handle to the location where you are going to read the Text or Binary file from
-- NOTE: The 'rb' parameter means "read in byte mode" and is only available
@jrichardsz
jrichardsz / PROCEDURE.sql
Last active Apr 22, 2021 — forked from vano468/restaurant.sql
oracle sql plsql snippets
View PROCEDURE.sql
CREATE OR REPLACE PROCEDURE "IS_OWN"."SP_SD_PGM_LOG_HST"
(
IN_UPD_PGM_ID IN VARCHAR2 , -- 로그를 남기는 프로그램ID 30
IN_MSG IN VARCHAR2 -- LOG 메세지 2000자 제한
)
/******************************************************************************
NAME : SP_SD_PGM_LOG_HST
PURPOSE : procedure application log Create
@jrichardsz
jrichardsz / PerformBuild.cs
Created Mar 29, 2021 — 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.
View PerformBuild.cs
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 Mar 10, 2021 — forked from revskill10/index.html
D3.js drawing nodes and links from json structure
View index.html
<!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 Mar 9, 2021 — forked from hubgit/list-files-in-folder.js
List all files in a folder (Google Apps Script)
View list-files-in-folder.js
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();