Skip to content

Instantly share code, notes, and snippets.

View Akronix's full-sized avatar
🍃
In the wild

Abel Serrano Juste Akronix

🍃
In the wild
View GitHub Profile
@Akronix
Akronix / get_ascii_code.c
Created October 26, 2017 18:08
Small C snippet to get ascii code on keypress (for Unix systems)
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
// from https://stackoverflow.com/a/17271636/2904315
#define clear() printf("\033[H\033[J")
// emulate getch() of conio.h
int getch() {
// from http://stackoverflow.com/a/23035044/15472
@yannvery
yannvery / How_to_maintain_fork_sync.md
Created January 20, 2016 09:52
How to maintain fork sync

How to maintain fork sync

Configuring a remote for a fork

To sync changes you make in a fork with the original repository, you must configure a remote that points to the upstream repository in Git.

  • Open a Terminal
  • List current configured remote repository for your fork
git remote -v
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
@touilleMan
touilleMan / SimpleHTTPServerWithUpload.py
Last active May 4, 2024 01:08 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active December 16, 2023 08:55
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software