Skip to content

Instantly share code, notes, and snippets.

@ogirginc
ogirginc / blog.md
Last active August 4, 2018 14:34 — forked from citizen428/blog.md

I originally wrote this article for Codementor in October 2014. It should have something for everyone, from fairly new git users to experienced developers.

1. Discard local file modifications

Sometimes the best way to get a feel for a problem is diving in and playing around with the code. Unfortunately, the changes made in the process sometimes turn out to be less than optimal, in which case reverting the file to its original state can be the fastest and easiest solution:

git checkout -- Gemfile # reset specified path 
git checkout -- lib bin # also works with multiple arguments
@waryas
waryas / MumGay.c
Last active April 26, 2024 14:47
Use mumble_ol.dll to render on any 3D application.
// OverwolfEmulator.cpp : définit le point d'entrée pour l'application console.
//
#include "stdafx.h"
#include <Windows.h>
#include <stdint.h>
#define OVERLAY_MAGIC_NUMBER 0x00000005
struct OverlayMsgHeader {
@mirhec
mirhec / raspi-setup-gitea.md
Created September 20, 2017 07:14
Installing Gitea on Raspberry Pi with nginx, SSL and automatic backups

Setup Gitea on Raspberry Pi (3)

These instructions are based on this article: https://www.alexruf.net/2016/05/23/setup-gogs-git-service.html.

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

sudo raspi-config

There you need to enable the SSH server and you should change the hostname.

@koldev
koldev / Logger.cs
Created September 23, 2014 10:36
Simple C# Logger class for writing log entries to console and/or file
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
public sealed class Logger
{
[Flags]
public enum Targets
{
@NARKOZ
NARKOZ / db_backup.sh
Created October 23, 2010 18:15
MySQL backup shell script
#!/bin/bash
# Shell script to backup MySQL database
# Set these variables
MyUSER="" # DB_USERNAME
MyPASS="" # DB_PASSWORD
MyHOST="" # DB_HOSTNAME
# Backup Dest directory
DEST="" # /home/username/backups/DB