Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Manos Parzakonis IronistM

🎯
Focusing
View GitHub Profile
@IronistM
IronistM / exportjson.js
Created Nov 11, 2013 — forked from pamelafox/exportjson.js
functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@IronistM
IronistM / setup-elementary.sh
Last active Oct 31, 2020 — forked from floriancourgey/setup-elementary.sh
Things to do after installing elementary OS Loki 0.4
View setup-elementary.sh
#Start with a dist upgrade
sudo apt dist-upgrade
# Get chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i ./google-chrome*.deb
sudo apt-get install -f
# dev (php, docker, git, node, bower, electron, composer)
sudo apt install -y \
@IronistM
IronistM / magic_script_modified.js
Last active Mar 31, 2019
A mash-up of the Magic Script with Measument protocol hits to track usage of the Spreadsheet and log events. #analytics #drive
View magic_script_modified.js
/**
* A script to automate requesting data from Google Analytics.
*
* @author nickski15@gmail.com (Nick Mihailovski)
*/
/**
* The name of the configration sheet.
* And various parameters.
View exportSheetAsJSON.gs.js
// Credit Christian Boutin
function exportSheetAsJSON() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var numCols = rows.getNumColumns();
var values = rows.getValues();
var output = "";
output += "{\""+sheet.getName()+"\" : {\n";
View puppeteer_datalayer.js
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('https://e-food.gr/')
const dl = JSON.parse(
await page.evaluate(() => JSON.stringify(window.dataLayer))
)
@IronistM
IronistM / GTM notifikator.gs
Last active Nov 22, 2018 — forked from postman31/GTM notifikator.gs
Notifies you about pending changes in your GTM workspaces by email
View GTM notifikator.gs
function myFunction() {
try {
var message = ''
var response = TagManager.Accounts.list()
response.account.map(function(account) {
Logger.log('fetching changes for %s', account.name)
var containers = TagManager.Accounts.Containers.list(account.path)
Utilities.sleep(5000)
if (!containers.container) {
Logger.log('no containers for %s', account.name)
View gist:878baf33e3aa7700f3a04ed1dda0a088
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@IronistM
IronistM / data_layer_console_dump.js
Created Sep 19, 2016
Browser console dump of Google Tag Manager data layer (source : http://pastebin.com/xyFGz54n via Julien coquet)
View data_layer_console_dump.js
// Paste this in browser console to dump your Google Tag Manager dataLayer object
var buffer="\n";
for (var i in dataLayer){
for (var j in dataLayer[i]){
buffer += j+":"+dataLayer[i][j]+"\n";
}
}
console.trace(buffer)
View adjectives.txt
able
abundant
adorable
agreeable
alive
ancient
angry
bad
beautiful
better
View RFM_analysis_code.r
###############################################################################
Description: A set of R functions to implement the Independent RFM scoring and the RFM scoring with input breaks.
Author: Jack Han http://www.DataApple.net email: jackhan2008 # qq.com
Version: 1.3
Date: 23 Dec 2013
Usage: Read the article "RFM Customer Analysis with R Language" http://www.dataapple.net/?p=84
################################################################################
################################################################################