Skip to content

Instantly share code, notes, and snippets.

@jsmpros
jsmpros / ps-read-excel.js
Last active March 31, 2023 20:17
JavaScript that reads binary excel files using POI and inserts rows into a PeopleSoft table
View ps-read-excel.js
// endsWith polyfill
if (!String.prototype.endsWith) {
String.prototype.endsWith = function(searchString, position) {
var subjectString = this.toString();
if (typeof position !== 'number' || !isFinite(position) ||
Math.floor(position) !== position ||
position > subjectString.length) {
position = subjectString.length;
}
position -= searchString.length;
@rxaviers
rxaviers / gist:7360908
Last active March 31, 2023 20:16
Complete list of github markdown emoji markup
View gist:7360908

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:
View launchdaemon_hijacking.go
package main
import (
"fmt"
"os"
"path/filepath"
"golang.org/x/sys/unix"
"howett.net/plist"
)
@Andrea-Scuderi
Andrea-Scuderi / .swift
Created September 3, 2019 10:23
CombineAPIDemo
View .swift
import Combine
import Foundation
enum APIError: Error {
case invalidBody
case invalidEndpoint
case invalidURL
case emptyData
case invalidJSON
case invalidResponse
@bradgessler
bradgessler / gem-to-sqlite.rb
Created March 17, 2023 21:09
Downloads a gem and dumps its documents into a Sqlite3 file
View gem-to-sqlite.rb
# gem-to-sqlite.rb
#
# Usage: ruby gem-to-sqlite.rb <gem_name> <gem_version>
# Example: ruby gem-to-sqlite.rb rake 13.0.6
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'yard', '~> 0.9.28'
@udhos
udhos / git - pushing PR changes to WIP fork
Created September 19, 2019 13:41
git - pushing PR changes to WIP fork
View git - pushing PR changes to WIP fork
# how to push PR changes to a work-in-progress fork?
upstream: https://github.com/exercism/go
fork: https://github.com/udhos/go
git clone https://github.com/exercism/go ;# get upstream
cd go
git remote add fork https://github.com/udhos/go
git pull fork master ;# get changes from fork
@afzafri
afzafri / fbpostscrape.php
Last active March 31, 2023 20:15
Fetch/Scrape Facebook Page posts contents without using Facebook API
View fbpostscrape.php
<?php
/* Facebook Page Posts Scrapper API created by Afif Zafri.
Fetch/Scrape posts contents of a page without using Facebook API
Usage: http://site.com/api.php?username=CODE , where CODE is the page username
*/
if(isset($_GET['username']))
{
@MeguminSama
MeguminSama / Discord Experiments.js
Last active March 31, 2023 20:10
Discord Experiments.js
View Discord Experiments.js
webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=Object.values(r.c)]);
var UserStore = cache.find(m => m?.exports?.default?.getCurrentUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active March 31, 2023 20:09 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
View export-named-sheet-as-csv.gs
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@AlexMAS
AlexMAS / ProcessAsyncHelper.cs
Last active March 31, 2023 20:09
The right way to run external process in .NET (async version)
View ProcessAsyncHelper.cs
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();