Skip to content

Instantly share code, notes, and snippets.

@istepanov
istepanov / Configuration.h
Last active July 26, 2023 16:45
Marlin Anet A8 config
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@aneelkkhatri
aneelkkhatri / facebook-video-download-script.js
Last active January 19, 2022 22:44
Script for downloading Facebook videos
var LINK_TYPE_SD = 'sd_src_no_ratelimit';
var LINK_TYPE_HD = 'hd_src_no_ratelimit';
(function downloadVideo(type) {
function getMyObject(doc) {
var scriptsCollection = doc.getElementsByTagName("script");
var scripts = [];
var regExp = /video_ids/i;
for (var i = scriptsCollection.length - 1; i >= 0; i--) {
var script = scriptsCollection[i].innerHTML;
@mlanett
mlanett / rails http status codes
Last active May 23, 2024 11:36
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@joshhartman
joshhartman / crypt.class.php
Last active November 25, 2022 10:10
Rijndael 256-bit Encryption (CBC) Class
<?php
class Crypt {
private $key;
function __construct($key){
$this->setKey($key);
}
@apavamontri
apavamontri / python-virtualenv-virtualenvwrapper-brew
Last active December 15, 2019 08:22
Install Python + virtualenv + virtualenvwrapper with brew on Mac OS X 10.8 Mountain Lion
# installation
brew doctor
brew install python
pip install virtualenv virtualenvwrapper
# Add following to .bash_profile
export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/local/share/python:$PATH:~/bin
export WORKON_HOME=$HOME/.virtualenvs
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.