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
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" } |
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
# vim: set fileencoding=utf-8 : | |
# | |
# How to store and retrieve gzip-compressed objects in AWS S3 | |
########################################################################### | |
# | |
# Copyright 2015 Vince Veselosky and contributors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
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
# .ebextensions/01-ebs.config | |
commands: | |
01clear-if-unmounted: | |
command: if ! mount | grep /media/ebs_volume > /dev/nul; then rm -rf /media/ebs_volume; fi | |
02attach-volume: | |
command: aws ec2 attach-volume --region eu-central-1 --volume-id vol-ddb08e34 --instance-id $(curl -s http://169.254.169.254/latest/meta-data/instance-id) --device /dev/sdh | |
ignoreErrors: true | |
03wait: | |
command: sleep 10 | |
04trymount: |
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
# Download Spark 1.4 from http://spark.apache.org/downloads.html | |
# | |
# Download the nyc flights dataset as a CSV from https://s3-us-west-2.amazonaws.com/sparkr-data/nycflights13.csv | |
# Launch SparkR using | |
# ./bin/sparkR --packages com.databricks:spark-csv_2.10:1.0.3 | |
# The SparkSQL context should already be created for you as sqlContext | |
sqlContext | |
# Java ref type org.apache.spark.sql.SQLContext id 1 |
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
knime.exe -consoleLog -noexit -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile="PathToYourWorkflow.zip" -destFile="OutputPathToYourWorkflow.zip" |
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
// https://pt.wiktionary.org/wiki/Template:conj.pt | |
// https://pt.wiktionary.org/wiki/Template:conj.pt.er | |
// https://pt.wiktionary.org/wiki/Special:WhatLinksHere/Template:conj.pt?limit=500&namespace=10 | |
/*var text = $('#wpTextbox1').val(); | |
jsMsg( text.replace( /<noinclude>[\s\S]+?<\/noinclude>/g, '' ) ); | |
$('#wpTextbox1').val().replace(/<noinclude>[\s\S]+?<\/noinclude>/g, '').match( /\{\{\s*conj\.pt\s*\|\s*título\s*=\s*([\s\S]+?)\s*\|\s*\{\{\{1\|?\}\}\}(.+?)\s*\|/ ); | |
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
<?php | |
/* | |
* Plugin: StreamlineFoundation | |
* | |
* Class: Schedule | |
* | |
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back | |
* and forth between scheduled moments in time and translating the created schedule back to a human readable form. | |
* | |
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format. |
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
#!/usr/bin/env bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
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
# Generic Aliases | |
alias ll='ls -latr' # List all file in long list format by modification time | |
alias ..='cd ..' # Go up one directory | |
alias ...='cd ../..' # Go up two directories | |
alias ....='cd ../../..' # Go up three directories | |
alias -- -='cd -' # Go back | |
alias c='clear' # Clear Screen | |
alias k='clear' # Clear Screen | |
alias cls='clear' # Clear Screen | |
alias _="sudo" # Execute with sudo |
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
def get_uncompressed_size(self, file): | |
fileobj = open(file, 'r') | |
fileobj.seek(-8, 2) | |
crc32 = gzip.read32(fileobj) | |
isize = gzip.read32(fileobj) # may exceed 2GB | |
fileobj.close() | |
return isize |