Skip to content

Instantly share code, notes, and snippets.

View ctring's full-sized avatar

Cuong Nguyen ctring

View GitHub Profile
@ctring
ctring / top10.sh
Created June 12, 2022 17:31
Find most frequently changed files
git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10
# Remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Don't rename windows automatically
set-option -g allow-rename off
@ctring
ctring / keybindings.json
Last active October 6, 2017 16:56
My Visual Studio Code custom settings and keybindings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "shift+cmd+v",
"command": "workbench.action.tasks.test"
}
,{
"key": "alt+1",
"command": "workbench.action.terminal.focusAtIndex1"
}
@ctring
ctring / ObstacleAvoidanceRobot
Created August 6, 2014 08:33
Source code of my obstacle avoidance robot for Tiva C Launchpad
#include <Servo.h>
// Obstacle avoiding program - Tiva C Launchpad
// Cuong T. Nguyen - 4/15/2014
/* Code for controling an obstacle avoidance robot, which has two DC drivers
interface with a L298N modul and a HC-SR04 range sensor mounted on a servo motor.
Range sensor
VCC: VBus
GND: GND
@ctring
ctring / delay.c
Last active February 15, 2024 11:36
Convert from SysCtlDelay in TivaWare library to milliseconds and microseconds delay.
/*
* delay.c - Delay in millisecond and microsecond functions
*
* Created on: Jul 7, 2014
* Author: Cuong T. Nguyen
*/
#include <stdint.h>
#include <stdbool.h>
#include "driverlib/sysctl.h"