Skip to content

Instantly share code, notes, and snippets.

View coccoinomane's full-sized avatar
🎯
Focusing

coccoinomane coccoinomane

🎯
Focusing
View GitHub Profile
@65
65 / gamselect.sh
Last active January 23, 2024 10:59
Helper file for for Google Workspace (GSuite) Resellers using GAMADV-XTD3 and need to swap between resold customers regularly
#!/bin/bash
#
#
# Author: Duncan Isaksen-Loxton
# Web: sixfive.com.au
#
# PREREQUISITES
@pgrandinetti
pgrandinetti / automatic_websocket_reconnect.py
Last active January 22, 2024 21:55
Automatic reconnect from websockets
import socket
import asyncio
import websockets
import time
import logging
import argparse
import threading
import sys
@R3V1Z3
R3V1Z3 / vscode-snakecase-to-camelcase.md
Last active April 16, 2024 09:18
Convert all occurrences of snake_case to camelCase in VS Code. Windows/Linux walk-through here: https://youtu.be/vlHel1fN5_A

Convert snake_case to camelCase in VS Code

  • Press CTRL-H ( ⌥⌘F on Mac ).
  • Press ALT-R ( ⌥⌘R on Mac ).
  • Type _([a-zA-Z]).
  • Press TAB and type $1.
  • Press ALT-ENTER ( ⌥ENTER on Mac ).
  • Press F1 and type upper, then press ENTER.
  • Press CTRL-ALT-ENTER ( ⌥ENTER on Mac ).
@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@championswimmer
championswimmer / Strict Sequelize: Typescript Overkill.md
Created January 19, 2018 22:46
Strict Sequelize: Typescript Overkill

Very Strict Sequelize: Into the land of Typescript Overkill

Disclaimer: If you believe that Typescript is a conspiracy by Microsoft to turn Javascript into C# and you believe in the religion of monkey-patching objects, then please do not proceed further. This article will burn your soul if you read it

Typescript: Enforce 'correct' code

Ever since I have started using Typescript, I cannot imagine writing large projects in plain JS anymore. My relationship to Typescript is best explained by this very nicely articulated piece by Tom Dale

While Typescript can make working with frontend frameworks like Angular and Vue a whole new revelation, using it on backend projects can have equally pleasing results. What I like about Typescript is the strictness can be turned a few notches up or down based on your requirements. And as you keep turning the strictness up by notches, you start seeing Typescripting starting to blo

@cfaria
cfaria / migrateorders.php
Last active February 12, 2024 16:45 — forked from maddisondesigns/migrateorders.php
Migrate WooCommerce Orders
<?php
//increase max execution time of this script to 150 min:
ini_set('max_execution_time', 9000);
//increase Allowed Memory Size of this script:
ini_set('memory_limit','960M');
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.
@siliconvallaeys
siliconvallaeys / Exclude Google Display Placements That Contain ...
Last active December 28, 2020 11:13
Automatically add negative placements for any new automatic GDN placements that include a particular piece of text
/****************************
* Add a Placement Exclusion When an Automatic Placement Contains the Text ...
* Version 1.0
*
* Created By: Frederick Vallaeys
* for FreeAdWordsScripts.com
* at the request of an Optmyzr.com subscriber
****************************/
function main() {
@tanaikech
tanaikech / submit.md
Last active December 27, 2022 09:26
Enhanced onEdit(e) using Google Apps Script

Enhanced onEdit(e) using Google Apps Script

onEdit(e) which is used for the Edit event on Spreadsheet has the old value as e.oldValue. The specifications for this are as follows.

  1. When an user edited a single "A1" cell, e of onEdit(e) shows hoge for e.oldValue and fuga for e.value.
  2. When an user edited the "A1:A2" multiple cells, e.oldValue and e.value of onEdit(e) are not shown anything.
  3. When an user copied and pasted from other cell, e.oldValue and e.value of onEdit(e) are not shown anything.

This sample script was created to retrieve both the edited values and the old values for the range of edited cells. This is the modified e.oldValue.

@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active January 27, 2024 00:02 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* 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"}];
@TylerFisher
TylerFisher / README.md
Last active July 13, 2021 18:48 — forked from onyxfish/README.md
Google Spreadsheets script to generate slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing