Skip to content

Instantly share code, notes, and snippets.

View mikhailbot's full-sized avatar
🐺

Mikhail mikhailbot

🐺
View GitHub Profile
@mikhailbot
mikhailbot / script.js
Created February 1, 2017 19:56
Remove "Dining" option for residence tour
$(document).ready(function () {
$('iframe').ready(function () {
var interval = setInterval(function () {
var menuItem = $('iframe').contents().find('.kolorMenuItem')[3];
// Remove dining option if present and clear interval
if (menuItem) {
menuItem.remove();
@mikhailbot
mikhailbot / index.js
Created March 20, 2017 12:37
AWS Lambda Unfluff Test
'use strict';
const unfluff = require('unfluff');
const fetch = require('node-fetch');
const TEST_URL = 'http://www.theverge.com/2017/3/17/14957460/the-legend-of-zelda-breath-of-the-wild-nintendo-switch-future-games';
const extract = (html) => {
console.log('Got HTML');
const results = unfluff(html);
@mikhailbot
mikhailbot / index.html
Created March 30, 2017 12:22
Rez Nav Collapsible
<input class="nav-toggle" id="nav-toggle" type="checkbox">
<label for="nav-toggle"></label>
<nav class="nav">
<ul class="nav-items">
<li class="nav-item-primary">
<span>Live the RezLife</span>
</li>
<ul class="sub-nav-items first">
<li class="sub-nav-item">Live here in First-Year</li>
@mikhailbot
mikhailbot / package.json
Last active April 1, 2017 18:57
Hapi Registration Error
{
"scripts": {
"start": "nodemon server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"h2o2": "^5.4.0",
"hapi": "^16.1.1",
"joi": "^10.3.4",
"wreck": "^12.0.0"
def init(initial_state) do
state = %{
ip_address: initial_state.host_ip_address,
current_status: initial_state.host_status,
previous_stuatus: initial_state.host_status,
latency: 0,
status_changes: 0
}
schedule_work()
@mikhailbot
mikhailbot / folder_sizes.sh
Last active December 28, 2017 16:39
List folder sizes within a directory
# For MacOS and Linux
find . -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \;
# For Linux
du -h --max-depth=1
@mikhailbot
mikhailbot / Contract Killer 3.md
Created April 24, 2018 12:45
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@mikhailbot
mikhailbot / settings.json
Created May 27, 2020 17:43
GitHub Dark for Windows Terminal
"schemes": [
{
"name" : "GitHub Dark",
"background" : "#24292e",
"black" : "#24292e",
"blue" : "#044289",
"cyan" : "#79b8ff",
"foreground" : "#fafbfc",
"green" : "#28a745",
"purple" : "#6f42c1",
@mikhailbot
mikhailbot / fan_control.sh
Last active September 21, 2021 01:38
R720 Fan Control
#!/bin/bash
# IPMI SETTINGS:
# Modify to suit your needs.
IPMIHOST=10.0.0.1
IPMIUSER=root
IPMIPW=calvin
IPMIEK=0000000000000000000000000000000000000000
# TEMPERATURE
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
gcode:
{% set BED = params.BED|default(100)|float %}
{% set EXTRUDER = params.EXTRUDER|default(240)|float %}
{% set CHAMBER = params.CHAMBER|default(15)|float %}
{% set SOAK = params.SOAK|default(15)|float %}
# Set bed temperature and partial nozzle temperature, turn on part cooling for heating chamber
{% if EXTRUDER >= 230 %}