Skip to content

Instantly share code, notes, and snippets.

View kevin's full-sized avatar
💮
beep

Kevin Xu <(^-^)> kevin

💮
beep
  • ut austin
  • cyberspace
  • 06:17 (UTC -05:00)
View GitHub Profile
@vip3rc0de
vip3rc0de / StopW10.bat
Last active February 20, 2024 12:57
This Bat will stop windows 10 spying you, also it will Uninstall OneDrive....So you will keep your privacy! This bat will Disable Data Logging Services, will Configure Windows Explorer, Uninstall OneDrive and edit Hosts to stop sending Telemetry Data to Microsoft!
@echo off
echo ***************************************************************
echo ***************************************************************
echo *** This Script will stop Windows 10 Spying you...YEYYYY!!! ***
echo ***************************************************************
echo *** We will Disable Data Logging Services ***
echo *** We will Configure Windows Explorer ***
echo *** We will Uninstall OneDrive ***
echo *** We will edit Hosts to stop sending Data to Microsoft ***
echo ***************************************************************
@gysel
gysel / JNumberTextField.java
Created November 14, 2012 20:37
JTextField only accepting numeric values
/**
* A {@link JTextField} that skips all non-digit keys. The user is only able to enter numbers.
*
* @author Michi Gysel <[email protected]>
*
*/
public class JNumberTextField extends JTextField {
private static final long serialVersionUID = 1L;
@Override
@dideler
dideler / bitwise-operators.md
Created April 12, 2012 08:25
Bitwise tricks

Inspired by this article. Neat tricks for speeding up integer computations.

Note: cin.sync_with_stdio(false); disables synchronous IO and gives you a performance boost. If used, you should only use cin for reading input (don't use both cin and scanf when sync is disabled, for example) or you will get unexpected results.

Multiply by a power of 2

x = x << 1; // x = x * 2