Skip to content

Instantly share code, notes, and snippets.

View beppe9000's full-sized avatar

beppe9000

View GitHub Profile
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active April 13, 2024 07:33
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@thebouv
thebouv / ducks.sh
Last active May 7, 2024 08:33
ducks: linux command for the 10 largest files in current directory
du -cks * | sort -rn | head -11
# Usually set this up in my bash profile as an alias:
# alias ducks='du -cks * | sort -rn | head -11'
# Because it is fun to type ducks on the command line. :)
@ldodds
ldodds / README.md
Last active September 2, 2023 01:15
How to make your own Xanadu demo

Twitter informed that a demo of Xanadu had launched, so I went to have a look. The demo only works in Firefox and it seems to be a cut down version of demos that I've seen Ted Nelson give in the past. But still: running code in the wild.

I met Ted Nelson once when we both spoke at an STM Innovations conference in 2006. I suspect he wouldn't have agreed with my much of my talk which looked at the web as a hypertext system and compared it with earlier approaches. My point of view was that we could bring those features back into the web by creating new services and by exploiting Javascript and web browsers to upgrade our experience of using the web. Evolution doesn't need to happen in a coordinated centralised way.

(When I say I met Ted Nelson, I meant that I shyly sat next to him at lunch while he expounded on various topics and fiddled with the tape recorder he was using to record all his conversations. So maybe, "met" isn't the right word (he won't

@magnetikonline
magnetikonline / dumprequest.php
Last active April 30, 2024 08:01
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']
@talwai
talwai / servefile.sh
Created January 23, 2015 19:57
One-shot HTTP webserver to serve file contents using netcat
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <some.file)\r\n\r\n"; cat some.file; } | nc -l 8080
@ultratrunks
ultratrunks / DllInjector.cs
Last active January 23, 2023 20:11
Clean class in C# used for DLL injection
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace DllInjector
{
public static class DllInjector
{
@0xbadfca11
0xbadfca11 / 00_README.md
Last active March 6, 2024 12:51
Windows ReFS versions
@fevangelou
fevangelou / my.cnf
Last active May 10, 2024 10:05
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@johnkary
johnkary / xray.php
Last active November 18, 2022 23:58
Exposing protected and private object methods using \Closure::bindTo(). Code below requires PHP 5.6+ due to argument unpacking (...$args). Could probably be written for PHP 5.4+ but didn't want to reinvent argument unpacking, else could also just use the Reflection implementation.
<?php
class User {
private $firstname;
private $lastname;
public function __construct($f, $l) {
$this->firstname = $f;
$this->lastname = $l;
}
@vain0x
vain0x / LICENSE.md
Last active November 4, 2022 23:38 — forked from DanielSWolf/Program.cs
Console progress bar (for VB.NET)