Skip to content

Instantly share code, notes, and snippets.

View eagl3s1ght's full-sized avatar

Anton Olsson eagl3s1ght

View GitHub Profile
@schmengler
schmengler / OnepageController.php
Created January 18, 2012 12:09
Magento Checkout Integration Test
<?php
/**
* Integration test for OnePageCheckout
*
* @author Fabian Schmengler <fschmengler@sgh-it.eu>
* @copyright SGH informationstechnologie UGmbH 2012
* @package SGH\Common
* @subpackage Test
*
*/
@tegansnyder
tegansnyder / export-all-product-attributes.php
Last active November 22, 2018 15:31
Really rough around the edge way (not complete) way to grab all product attributes to a csv with direct SQL in Magento. Don't trust this worth your life :)
<?php
/**
* export-all-product-attributes.php
* @author Tegan Snyder <tsnyder@tegdesign.com>
*/
// init Magento
require_once('app/Mage.php');
umask(0);
Mage::app('default');
@BalzGuenat
BalzGuenat / terraria_tutorial.md
Last active February 5, 2024 03:24
Installing and running a Terraria server with tShock on a Raspberry Pi

Installing and running a Terraria server with tShock on a Raspberry Pi

This was originally posted here on reddit. If you decide to try this, please post a comment either confirming that it works or stating any issues that came up. Thanks to reddit user /u/mat_storm1 for pointing out some typos and thanks to reddit user /u/supercore23 for pointing out potential issues with spaces in the world path.

What is this?

This guide explains how to install and run a Terraria server on your Raspberry Pi. I assume you have already installed Raspbian and have a very basic understanding of the command line. Installation on other Unix-based systems should be very similar. The goal is to reach a setup that only requires you to plug in your Pi to start the server. Connecting to the server should be easily done by using a hostname, not an IP. We should also be able to ssh into the server and do server-admin stuff at any t

@yohanesgultom
yohanesgultom / ! PHP Scripts
Last active May 30, 2021 10:38
Random PHP scripts
Random PHP scripts
@perguth
perguth / .htaccess
Last active January 28, 2024 19:01
Apache reverse proxy `.htaccess` file eg. for NodeJS. @Uberspace
SetEnvIf Request_URI "^(.*)" PORT=65300
RewriteEngine On
RewriteBase /
# CORS
Header add Access-Control-Allow-Origin "*"
# HTTPS
RewriteCond %{HTTPS} !=on
@noelboss
noelboss / git-deployment.md
Last active July 16, 2024 09:50
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@developit
developit / _Dead Simple Fetch Caching.md
Created August 28, 2016 15:36
Dead simple fetch caching

Dead Simple Fetch Caching

Wrap fetch() in a memoize.

Not only does this cache repeated requests for the same resource, it also de-dupes concurrent requests!

Notes:

  • Caching the raw response object doesn't work, since the response body is a stream and can thus only be read once
  • Instead, cache your already read body (optionally still including the original request, just read the body prior)
@Hawkuro
Hawkuro / cmder_context_disable.reg
Created January 12, 2017 16:33
Registry files to enable Cmder submenus in Explorer context menu
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\cmder]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\cmder.admin]
[-HKEY_CLASSES_ROOT\Directory\shell\cmder.admin]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmder.cmd]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmder.cmd.bg]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmder.ps]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmder.ps.bg]
@mgoellnitz
mgoellnitz / snip.sh
Last active January 4, 2024 17:57
GitLab Snippet Command Line Tool
#!/bin/bash
#
# Copyright 2016-2021 Martin Goellnitz
#
# 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
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@waleedahmad
waleedahmad / downtime.py
Last active June 13, 2024 02:38
Python script to monitor your internet down time
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import csv
import sys
import time
import socket
import datetime