Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Manos Parzakonis IronistM

🎯
Focusing
View GitHub Profile
@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 / Termux.Jupyter.md
Created Jan 3, 2018 — forked from pcornier/Termux.Jupyter.md
Install Jupyter with Numpy, SciPy, Pandas and Matplotlib
View Termux.Jupyter.md
pkg install apt-transport-https curl gnupg pkg-config clang
pkg install freetype freetype-dev libpng libpng-dev libzmq-dev libzmq

mkdir $PREFIX/etc/apt/sources.list.d

echo "deb [trusted=yes] https://its-pointless.github.io/files/ termux extras" > $PREFIX/etc/apt/sources.list.d/pointless.list

curl -O https://its-pointless.github.io/pointless.gpg
@IronistM
IronistM / 3G-fraction-1s-example.sql
Created Dec 14, 2017 — forked from RatulSaha/3G-fraction-1s-example.sql
Chrome User Experience Report Analyzed with Google BigQuery
View 3G-fraction-1s-example.sql
SELECT
SUM(fcp.density)
FROM
`chrome-ux-report.chrome_ux_report.201710`,
UNNEST(first_contentful_paint.histogram.bin) AS fcp
WHERE
origin = "https://www.google.co.in"
AND effective_connection_type.name = "3G"
AND fcp.END <= 1000
@IronistM
IronistM / upgrade_packages.R
Created Sep 26, 2017 — forked from bearloga/upgrade_packages.R
The script can be used to re-install packages after upgrading R (on Linux or Mac), since libraries cannot be reused between different minor versions (e.g. when upgrading 3.2.3 to 3.3.2). It detects when a package was installed from CRAN vs GitHub/Git and re-installs it using the appropriate func. Usage: `Rscript upgrade_packages.R`
View upgrade_packages.R
# WMF only:
if (file.exists("/etc/wikimedia-cluster")) {
message('Detected that this script is being run on a WMF machine ("', Sys.info()["nodename"], '"). Setting proxies...')
Sys.setenv("http_proxy" = "http://webproxy.eqiad.wmnet:8080")
Sys.setenv("https_proxy" = "http://webproxy.eqiad.wmnet:8080")
}
# General use:
message("Checking for a personal library...")
if (!dir.exists(Sys.getenv("R_LIBS_USER"))) {
View inspect_all_the_excel_sheets.R
library(tidyverse)
library(magrittr)
library(stringr)
library(readxl)
directory <- "bunch/of/excel/files"
# Get an overview of all the Excel files and their sheets
sheets <-
data_frame(file = list.files(directory, full.names = TRUE),
@IronistM
IronistM / sql.export.randomForest.R
Created May 24, 2017 — forked from shanebutler/sql.export.randomForest.R
Deploy your RandomForest models in SQL! This tool enables in-database scoring of Random Forest models built using R. To use it, you simply call the function with the Random Forest model, output filename, SQL input data table and the name of the unique key on that table. For example:sql.export.rf(rf.mdl, file="model_output.SQL", input.table="sour…
View sql.export.randomForest.R
# sql.export.rf(): save a randomForest model as SQL
# v0.04
# Copyright (c) 2013-2014 Shane Butler <shane dot butler at gmail dot com>
#
# sql.export.rf is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# sql.export.rf is distributed in the hope that it will be useful, but
@IronistM
IronistM / s3.sh
Created Apr 11, 2017 — forked from chrismdp/s3.sh
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
View s3.sh
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@IronistM
IronistM / install-rstudio-daily.sh
Last active Jun 23, 2017 — forked from aronatkins/install-rstudio-daily.sh
Install RStudio daily build on OSX/macOS or Elementary OS
View install-rstudio-daily.sh
#!/bin/bash
#
# Installs the latest RStudio daily desktop build for OSX/macOS and Ubuntu(amd64)
#
# https://support.rstudio.com/hc/en-us/articles/203842428-Getting-the-newest-RStudio-builds
set -e
install_macos_daily() {
REDIRECT_URL="https://www.rstudio.org/download/latest/daily/desktop/mac/RStudio-latest.dmg"
@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 \