Skip to content

Instantly share code, notes, and snippets.

View danryan's full-sized avatar
🔥

Dan Ryan danryan

🔥
View GitHub Profile
@Sebazzz
Sebazzz / Creality-CR-6-Unboxing-guide.md
Last active September 5, 2023 11:30
Creality CR-6 Unboxing & assembly guide

CR-6 post-unboxing checklist

With most of the CR-6 SE issues being due to bad wiring or loose/too tight screws I feel like it is time for a good post-unboxing checklist, to be walked through pre-assembly. Even though I do not have my unit shipped yet, I've seen enough issues and fixes that I can compile this post.

I initially posted this on the independent CR-6 community Facebook group but since not everyone wants to use Facebook (which I totally understand), I will repost it here. I mirrored most of the relevant content of Facebook to imgur.

If you have any feedback or anything that needs to be added, please let me know and I will amend this post!

Note: There are some known issues with this printer - please read the entire guide. (It is long, I know, but this is a necessary evil!)

Communities

@lyrixx
lyrixx / segfault-finder.php
Last active August 15, 2023 21:17
How to find a segfault in PHP
<?php
register_tick_function(function() {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
$last = reset($bt);
$info = sprintf("%s +%d\n", $last['file'], $last['line']);
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND);
// or
// file_put_contents('php://output', $info, FILE_APPEND);
});
@sysboss
sysboss / query_athena.py
Created May 21, 2018 15:41
SQL Query Amazon Athena using Python
#!/usr/bin/env python3
#
# Query AWS Athena using SQL
# Copyright (c) Alexey Baikov <sysboss[at]mail.ru>
#
# This snippet is a basic example to query Athen and load the results
# to a variable.
#
# Requirements:
# > pip3 install boto3 botocore retrying
# Source: https://gist.github.com/ed8ad113fff4322ef309198d5455687f
##############################################################################################
# Full App Lifecycle In Kubernetes With Argo CD, DevSpace, vCluster, k3d, and GitHub Actions #
# https://youtu.be/uU-EAQ8Vbvk #
##############################################################################################
# Referenced videos:
# - How To Create Virtual Kubernetes Clusters With vcluster By loft: https://youtu.be/JqBjpvp268Y
# - DevSpace - Development Environments in Kubernetes: https://youtu.be/nQly_CEjJc4
@detiber
detiber / README.md
Last active April 16, 2023 02:21
Using CFSSL as an external CA for kubeadm

CFSSL as an external CA for non-ha kubeadm intialized clusters

Using cfssl to Create an External CA Infrastructure

Install cfssl

# This requires an existing Go environment with GOPATH set
go get -u github.com/cloudflare/cfssl/cmd/...
@dimus
dimus / Hash.from_xml using Nokogiri
Created March 17, 2010 14:29
Adding Hash.from_xml method using Nokogiri
# USAGE: Hash.from_xml:(YOUR_XML_STRING)
require 'nokogiri'
# modified from http://stackoverflow.com/questions/1230741/convert-a-nokogiri-document-to-a-ruby-hash/1231297#1231297
class Hash
class << self
def from_xml(xml_io)
begin
result = Nokogiri::XML(xml_io)
return { result.root.name.to_sym => xml_node_to_hash(result.root)}
@gudbergur
gudbergur / README.markdown
Created February 19, 2012 23:49
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@juanje
juanje / gist:3797297
Created September 28, 2012 00:38
Mount apt cache of a Vagrant box in the host to spin up the packages installation

This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.

I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.

def local_cache(basebox_name)
  cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
  partial_dir = cache_dir.join('partial')
  partial_dir.mkdir unless partial_dir.exist?
 cache_dir
Scenario: Get List of My Hitchhiking Items via API
Given the existing things:
|name|
|The Guide (duh)|
|A towel|
|Sub-Etha Sens-O-Matic|
|Pan Galactic Gargle Blaster|
|Kill-o-Zap blaster pistol|
And the existing accounts:
|email|name|password|
@leonlaser
leonlaser / ideolog_pattern.txt
Last active October 3, 2022 22:48
[logfmt regex] Split your logfmt logfile into key value pairs #golang #go #regex #regularexpression #logfmt #intellij #ideolog
Message pattern: ^time="(.*)" level=([^\s]+) .*$
Message start pattern: ^time=
Time format: yyyy-MM-dd'T'HH:mm:ssXXX
Time capture group: 1
Serverity capture group: 2
Reference: https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats