Skip to content

Instantly share code, notes, and snippets.

View gabriel-lopez's full-sized avatar
🎯
Focusing

Gabriel Lopez gabriel-lopez

🎯
Focusing
View GitHub Profile
@wess
wess / gist:c66382198d48238787718b9bb8e9f3d9
Created July 30, 2019 21:07
Start/End GCodes for BLTouch Ender 3
; Ender 3 Custom Start G-code
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M104 S160; start warming extruder to 160
G28 ; Home all axes
G29 ; Auto bed-level (BL-Touch)
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
@jkatz
jkatz / setup.sh
Last active September 9, 2023 03:00
Install PostgreSQL 10 & pgAdmin 4 with Docker
#!/bin/bash
mkdir postgres
cd postgres
docker volume create --driver local --name=pgvolume
docker volume create --driver local --name=pga4volume
docker network create --driver bridge pgnetwork
@DanielSWolf
DanielSWolf / Program.cs
Last active November 9, 2025 21:44
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@hdf
hdf / GetAoBAddresses.cs
Created August 14, 2014 21:09
C# console app to get addresses from aobscan patterns (Cheat Engine) (Uses Patcher.dll from: https://github.com/hdf/patcher2)
using Patcher2; // Uses Patcher.dll from: https://github.com/hdf/patcher2
using System;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
namespace GetAoBAddresses
{
internal class Program
@willurd
willurd / web-servers.md
Last active March 13, 2026 17:53
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@irazasyed
irazasyed / get-img-raw-data.php
Created April 14, 2013 13:05
PHP: Get image raw data (cURL & file_get_contents support)
/*-------------------------------------------------+
| Gets Image Raw Data,
| Used with GD Lib (imagecreatefromstring)
+-------------------------------------------------*/
function getImageRawData($image_url) {
if (function_exists('curl_init')) {
$opts = array();
$http_headers = array();
$http_headers[] = 'Expect:';