Skip to content

Instantly share code, notes, and snippets.

@BretFisher
BretFisher / Dockerfile
Last active June 14, 2024 04:22
Multi-stage Dockerfile example of installing dependencies with COPY --from
# any images you use later, add them here first to create aliases
# I like keeping all my versions at the top
FROM node:14.3-slim as node
FROM php:7.2.1-fpm-slim as php
FROM nginx:1.17 as nginx
# The real base image to start from
FROM ubuntu:focal-20210827 as base
# install apt stuff
@breakfastpizza
breakfastpizza / ender3-customStart.gcode
Last active January 24, 2024 21:58
Ender 3 v2 UBL Custom Start G-Code
; Ender 3 Custom Start G-Code
;Cura
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
;Prusaslicer
M140 S[first_layer_temperature] ; Set Heat Bed temperature
M190 S[first_layer_bed_temperature] ; Wait for Heat Bed temperature
M104 S160 ; start warming extruder to 160
@bradwilson
bradwilson / settings.json
Last active September 7, 2024 12:14
Ubuntu color scheme for Windows Terminal
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": "copy",
"keys": "ctrl+shift+c"
},
{
"command": "paste",
@halfzebra
halfzebra / PROPOSAL.md
Last active March 23, 2018 17:12
How Create React App changed the way I work

This gist is a proposal for lightning talk at Reactive Conf 2017

Like the idea? Give me a 🌟 and see you in Bratislava!

How Create React App changed the way I work

Hello, my name is Eduard!

I'm the maintainer of Create Elm App and contributor to Create React App and Webpack

@humbertodias
humbertodias / gist:e44b9413f22e3990118306f189cbbf45
Created December 30, 2016 19:29
Docker for Windows - Hardware assisted virtualization and data execution protection must be enabled in the BIOS
Hardware assisted virtualization and data execution protection must be enabled in the BIOS
http://stackoverflow.com/questions/39684974/docker-for-windows-error-hardware-assisted-virtualization-and-data-execution-p
If the features described are enabled the problem is with Hyper-V that is disabled or Hypervisor agent not running
Open PowerShell as administrator and
a) Enable Hyper-V with
@Glideh
Glideh / RolesType.php
Last active March 11, 2024 12:24
This is an example of how one could create a custom type for roles to add in a User form
<?php
namespace AdminBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authorization\AuthorizationChecker;
use Symfony\Component\Security\Core\Role\Role;
@niksumeiko
niksumeiko / git.migrate
Last active August 27, 2024 08:20
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@blackreaven
blackreaven / Pager.twig
Created October 3, 2013 15:52
Twig pager
{#
# count => total item
# limit => item by page
# offset => start item idex
# page => current page
# lastpage => last page = page number
# adjacents => page count display before and after the current page
#}
{% if limit is not defined %}
{% set limit = 10 %}
@carlosspohr
carlosspohr / README.md
Last active August 31, 2023 00:35
Functional Apache2 route for Gitlab 5.0

For your Ruby, you'll must install this gems:

sudo gem install passenger

sudo passenger-install-apache2-module

At this moment, you'll asked to install some Apache2's deps (three deps):

sudo apt-get install apache2-prefork-dev

@sowelie
sowelie / marker-rollover.js
Last active May 9, 2018 09:11
Custom marker implementation for leaflet with rollover popup functionality.
var MyCustomMarker = L.Marker.extend({
bindPopup: function(htmlContent, options) {
if (options && options.showOnMouseOver) {
// call the super method
L.Marker.prototype.bindPopup.apply(this, [htmlContent, options]);
// unbind the click event