Skip to content

Instantly share code, notes, and snippets.

View IronistM's full-sized avatar
🏗️
Under construction

Manos Parzakonis IronistM

🏗️
Under construction
View GitHub Profile
@IronistM
IronistM / GTM notifikator.gs
Last active November 22, 2018 12:20 — forked from postman31/GTM notifikator.gs
Notifies you about pending changes in your GTM workspaces by email
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)
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@IronistM
IronistM / Termux.Jupyter.md
Created January 3, 2018 12:26 — forked from pcornier/Termux.Jupyter.md
Install Jupyter with Numpy, SciPy, Pandas and Matplotlib
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 December 14, 2017 16:06 — forked from RatulSaha/3G-fraction-1s-example.sql
Chrome User Experience Report Analyzed with Google BigQuery
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 September 26, 2017 06:57 — 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`
# 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"))) {
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 12:56 — 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…
# 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 April 11, 2017 13:00 — forked from chrismdp/s3.sh
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# 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 June 23, 2017 20:11 — forked from aronatkins/install-rstudio-daily.sh
Install RStudio daily build on OSX/macOS or Elementary OS
#!/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 May 8, 2023 18:52 — forked from floriancourgey/setup-elementary.sh
Things to do after installing elementary OS Loki 0.4
#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 \