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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SPREADSHEET_URL = ""; | |
function facebookSpend() { | |
var ss = SpreadsheetApp.openByUrl(SPREADSHEET_URL); | |
var sheet = ss.getSheetByName('facebook'); | |
var values = []; | |
Utilities.sleep(1000); | |
var fullUrl = 'https://graph.facebook.com/v2.3/act_xxx/stats?access_token=xxx'; | |
var fetchRequest = UrlFetchApp.fetch(fullUrl); | |
var results = JSON.parse(fetchRequest.getContentText()); | |
Logger.log(results.spent/100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(ggmap) | |
library(plyr) | |
library(grid) | |
library(gridExtra) | |
# read in cleaned up data | |
dat <- read.table("quakes.dat", header=TRUE, stringsAsFactors=FALSE) | |
# map decimal magnitudes into an integer range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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"))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), |
NewerOlder