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 | |
# unnoficial strict mode, note Bash<=4.3 chokes on empty arrays with set -u | |
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
# https://sharats.me/posts/shell-script-best-practices/ | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
IFS=$'\n\t' | |
shopt -s nullglob globstar |
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
javascript: let url = 'https://www.google.com/search?q={}+site%3Ahttps%3A%2F%2Fwww.seriouseats.com%2F+OR+site%3Ahttps%3A%2F%2Ffoodwishes.blogspot.com%2F+OR+site%3Ahttps%3A%2F%2Fwww.budgetbytes.com%2F+OR+site%3Ahttps%3A%2F%2Fcookieandkate.com%2F+OR+site%3Ahttps%3A%2F%2Fwww.halfbakedharvest.com%2F+OR+site%3Ahttps%3A%2F%2Fminimalistbaker.com%2F+OR+site%3Ahttps%3A%2F%2Fsmittenkitchen.com%2F+OR+site%3Ahttps%3A%2F%2Fwww.simplyrecipes.com%2F+OR+site%3Ahttps%3A%2F%2Fwww.blueapron.com%2F&hl=en'; let q = prompt('keywords'); q = q.replace(' ', '+'); url = url.replace('{}', q); window.location.href = url; |
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
# first and last days of data you want to export | |
start_date='2015-01-01' | |
end_date='2020-12-31' | |
curl_date() { | |
date="$1" | |
# you'll need to replace the cookie info with your cookie info | |
# you can get this info by logging into the jefit website then going to the web console "network" section, refreshing, and right clicking on the root request and selecting "copy as curl" | |
curl "https://www.jefit.com/my-jefit/my-logs/log/?dd=$date" \ | |
-H 'Cookie: PHPSESSID=1111111111AAAAAAAAAA; dfsessionhash=11111111111aaaaaaaaaa; dflastvisit=11111111; dflastactivity=1111111111; dfpassword=111111111111111111111111aaaaaaaaaaaaaaaaaaa; dfuserid=11111111' \ |
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
from random import randrange, choice, sample | |
colors = [ 'red', 'blue', 'green', 'black', 'white' ] | |
# example cost gemstone points | |
card = ( {'red': 2, 'green': 2 }, 'white', 1 ) | |
def genDeck1Card(): | |
cost = { color: 0 for color in colors } | |
num_gemstones = randrange(3, 5+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
module Main exposing (..) | |
import Html exposing (Html) | |
import Html.App as Html | |
import Html.Attributes exposing (style) | |
import Time exposing (fps, every, second) | |
import Signal exposing (Signal) | |
import Random exposing (Generator, Seed, initialSeed, int, float, generate) | |
import List exposing (head, tail) | |
import Graphics.Element exposing (Element, show) |
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 python | |
# -*- coding: utf-8 -*- | |
from lxml import html | |
import requests | |
import sys | |
import readline | |
# curl 'http://www.yellowbridge.com/chinese/dictionary.php' -H 'Cookie: PHPSESSID=qijdue2gmrhs4pltdphjcqj3o2; _ga=GA1.2.112204757.1484656688; _gid=GA1.2.125872261.1495576784' -H 'Origin: http://www.yellowbridge.com' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://www.yellowbridge.com/chinese/dictionary.php' -H 'Connection: keep-alive' -H 'DNT: 1' --data 'searchMode=P&word=shen2me' --compressed | |
headers = { |
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
import pyautogui # this will require some packages or something to be installed | |
import time | |
cmap = { (253, 178, 54): 'y', (255, 109, 114): 'r', (14, 177, 156): 'g', (79, 150, 242): 'b', (179, 111, 238): 'p', (151, 136, 116): 'l', (247, 239, 228): '0', (20, 179, 158) : 'g' } | |
hgap = 49 | |
vgap = 49 | |
xo, yo = pyautogui.position() | |
def getColor(x, y, 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
$(".checkbox > input").each(function () {this.checked=true;}); |
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
<html> | |
<body onload="go(1, true, 0)"> | |
<div style="text-align:center; padding-top:200px; font-size:40px; line-height:80px;"> | |
<div id="timer"></div> | |
<div id="exercise"></div> | |
</div> | |
</body> | |
<script> | |
var exercises = ["Preparing", "Running in Place", "Resting (Jumping Jacks Next)", "Jumping Jacks", "Resting (Jumping Squats Next)", "Jumping Squats", "Resting (Push Ups Next)", "Push Ups", "Resting (Bicycle Crunch Next)", "Bicycle Crunch", "Resting (Burpees Next)", "Burpees", "Resting (Mason Twist Next)", "Mason Twist", "Resting (Mountain Climbers Next)", "Mountain Climbers", "All Done!"]; | |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="12"> | |
<profile kind="CodeFormatterProfile" name="mine" version="12"> | |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> |
NewerOlder