Skip to content

Instantly share code, notes, and snippets.

View dd86k's full-sized avatar
✌️
Befriend software

dd dd86k

✌️
Befriend software
View GitHub Profile
@dd86k
dd86k / GAME2.CMD
Created July 21, 2015 19:37
GAME2 - A prototype "game" I made back in 2013
@ECHO OFF
REM Game2, an extract from LittleHelper, a script I made to
REM aid myself.
SET /A X=2
SET /A Y=2
:GAME2_START
CLS
IF %X%==0 (
@dd86k
dd86k / _CleanUnder2MB.cmd
Created July 21, 2015 23:50
Clean files under 2 MB
@ECHO OFF
REM Written by DD~!
REM Loop within the files, current directory
FOR %%A IN (*) DO (
REM If the file isn't the script file (filename)
IF NOT "%%A"=="%~nx0" (
REM If the file is under 1 MB, delete it
IF %%~zA LEQ 2097152 DEL /Q "%%~A"
)
@dd86k
dd86k / LittleHelper_dev.cmd
Created July 21, 2015 23:54
Last version before abandon, massive script made for fun back in 2013
REM Oh hi. I didn't documented my script. :V
REM TODO/THINGS/ETC:
REM - Nothing.
@ECHO OFF
:reset
CLS
SET VER=r0.8.4dev1
IF "%SESSIONNAME%"=="" (
SET ISADMIN=TRUE
@dd86k
dd86k / DATA_USBTool.bat
Created July 21, 2015 23:55
Some script I did to backup my USB drive from time to time
@ECHO OFF
REM Version 1.3.6
TITLE Welcome to DATA_Tools.
IF /I "%CD:~0,2%"=="%SYSTEMDRIVE%" (
ECHO This script must be on the USB drive!
ECHO Canceled operation.
ECHO.
PAUSE
@dd86k
dd86k / README.md
Last active October 11, 2016 22:14
Make a character move! (Linux, C/C++, ncurses)

You will need the libcurses-dev packet which can be installed with:

APT: (Debian, Ubuntu)

sudo apt-get install libncurses-dev -y

YUM/DNF: (Fedora)

sudo yum intall libncurses-dev -y

@dd86k
dd86k / DeleteThumbsDB.cmd
Last active March 16, 2016 23:57
Deletes the Thumbs.db files which is the thumbnail database for Windows whenever "View an icon instead of an thumbnail" option is unchecked.
@ECHO OFF
WHERE /R .\ Thumbs.db > TEMP
IF ERRORLEVEL 1 GOTO L1
GOTO L0
:L0
FOR /F %%B IN (TEMP) DO (
DEL /Q /S %%B
@dd86k
dd86k / Protocols.md
Last active August 25, 2020 02:08
List of useful protocols

Some useful protocols

Microsoft

Microsoft Search

  • search-ms
  • search-ms:displayname=<DISPLAY_NAME>&crumb=System.Generic.String%3A<SEARCH_INPUT>&crumb=location:

DISPLAY_NAME: Explorer will show this title in the bar (e.g. Search results for <SEARCH_INPUT>) SEARCH_INPUT: Search input

@dd86k
dd86k / bg.rs
Last active March 24, 2016 04:31
Simple Console Box Generator (Windows) in Rust
fn main() {
generate_box(10, 4, 5, 4);
}
// ┌┐└┘─│
fn generate_box(x: i32, y: i32, width: i32, height: i32) {
let mut nwidth = width - 2; // Corners included
let mut nheight = height - 2;
if nwidth < 2 { nwidth = 0; }
@dd86k
dd86k / readme.md
Last active May 16, 2017 17:12
Some languages and their first appearance year
Language First appeared
Assembly 1949
Speedcoding 1953
Fortran 1957
Lisp 1958
ALGOL 58 1958
COBOL 1959
ALGOL 60 1960
CPL 1963
@dd86k
dd86k / FizzBuzz.cs
Last active April 6, 2016 03:54
"One-liner" FizzBuzz in C# 6.0
using static System.Console;
namespace FizzBuzz
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 100; i++) { WriteLine(i % 15 == 0 ? "FizzBuzz" : (i % 5 == 0 ? "Buzz" : (i % 3 == 0 ? "Fizz" : i.ToString()))); }
}