Skip to content

Instantly share code, notes, and snippets.

View cutecycle's full-sized avatar

Nina Reynolds cutecycle

View GitHub Profile
@polotek
polotek / pipeaccept.js
Created May 18, 2011 01:16 — forked from heapwolf/pipeaccept.js
accepting input from a pipe, nodejs
var data;
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(chunk) {
data += chunk;
});
process.stdin.on('end', function() {
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@usami
usami / pocket_download.sh
Created March 16, 2013 01:38
Download all entries in your Pocket (http://getpocket.com).
#!/bin/sh
# before running this script, run the following command
# wget --save-cookies cookies.txt --post-data 'feed_id=****ID****&password=****PASS****' http://getpocket.com/login_process/
i=1
while [ $i -le 60 ]
do
wget --load-cookies cookies.txt -p http://getpocket.com/unread/$i
(( i++ ))
@oreillyross
oreillyross / Common mistakes.scala
Last active September 24, 2020 17:45
Common mistakes made in scala coding
val a = 1 //> a : Int = 1
val b = 2 //> b : Int = 2
// Common mistakes with pattern matching
// the lower case variable pattern needs backwards quotes to work.
def oneOrTwo(i: Int): String = i match {
case `a` => "One!"
case `b` => "Two!"
} //> oneOrTwo: (i: Int)String
@awjuliani
awjuliani / Q-Net Learning Clean.ipynb
Created August 25, 2016 20:30
Basic Q-Learning algorithm using Tensorflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
a(state) {
state.x = 5;
}
b(state) {
out = state;
out.x = 5;
return out;
@Herringway
Herringway / disgaea series random names.txt
Created June 4, 2018 00:50
Sorted list of random names dumped from the disgaea series
#disgaea 4
...What?
14 & Under
2 Second!
20 Hour Work Days
236+P
3 Chop Sticks
3 Color Pen
3 Hours to Live
3 Million HL
@syntaqx
syntaqx / cloud-init.yaml
Last active July 23, 2024 12:16
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@gwalkey
gwalkey / gist:c6d889884c3bb4a835c99f65b4d39ab6
Last active October 26, 2021 16:09
Powershell Anonymous Lamda for Retry with Exponential Backoff
# https://vexx32.github.io/2018/10/26/Anonymous-Functions/
function Retry()
{
param(
[Parameter(Mandatory=$true)][Action]$action,
[Parameter(Mandatory=$false)][int]$maxAttempts = 3
)
$attempts=1