Skip to content

Instantly share code, notes, and snippets.

View Dascr32's full-sized avatar

Daniel Aguilar Dascr32

View GitHub Profile
@Echo off
title Windows Update Service Manager (aka turn that shit off)
cls
goto welcome_screen
:welcome_screen
cls
echo ______ __ __ __
echo/\__ _\ /\ \__/\ \ /\ \__
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"draw_indent_guides": false,
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
#==================================================
# Nth root approximation algorithm.
# Universidad de Costa Rica.
# Tarea # 1.
# Daniel Aguilar S (B40129).
#--------------------------------------------------
# USAGE
#
# Use "source("<script_path>/calcroot.m")" in order
# to use all the functions in this script.
/*
Simple Arduino program that reads the temperature from a tmp36 sensor
and show it in a 16x2 LCD. Also a loading splash screen is displayed when
turned on (just for lols). It works perfectly in the arduino simulator
(123d.circuits.io), however due to limitations of the simulator, datetime
libraries cannot be used, so the date and time shown are not real, in a
future revision that functionality will be added.
NOTE: This program has not been tested in a real arduino. So be careful.
@Dascr32
Dascr32 / .emacs
Last active January 20, 2016 21:32
;; Daniel Aguilar's .emacs file
;; Based on Baris Yuksel's .emacs file
;; Last edit: 4/9/15
;; Package list:
;; - MELPA repository
;; - Auto-complete
;; - Yasnippet
;; - Auto-complete-c-headers
;; - Nyan Mode
; Author: Daniel Aguilar S.
; IS: 8086 Assembly.
; Desc: Prints a positive or negative number.
org 100h
mov al, 11010101b ; Number to be displayed. (8 bits)
print proc
mov bx, 0AH ; Initialize divisor by 10
@Dascr32
Dascr32 / helloWorld.asm
Created August 29, 2015 03:22
Hello World in 8086 assembly.
org 100h
jmp start
message db "Hello World$" ; Allocate 1 byte
start:
mov dx, offset message
mov ah,9h ; Print function
int 21h
@Dascr32
Dascr32 / cst.bat
Created August 4, 2015 17:25
Simple batch script that test your internet connection. It tells the number and time of disconnections. Also creates a log file in the c:/ drive with all the events.
@Echo off
title Connection Stability Test / Dascr32
cls
set /A disconnections=1
echo Start time:
time/t
echo ============================================ >> c:\cstb-log.txt
public boolean solve(int row, int col) {
if (row == 9) { // Solved!
return true;
}
if (matrix[row][col] != 0) { // Cell not empty move to the other
if (solve(col == 8 ? row + 1 : row, col == 8 ? 0 : col + 1)) {
@Dascr32
Dascr32 / img-proc.java
Last active August 29, 2015 14:18
Process a bit map image (greyscale, color) into 1's or 0's for object detecting algorithms.
public class ImageProcessing {
private int imageHeight;
private int imageWidth;
private int imageMatrix[][];
private Color color;
final int COLOUR_DEPTH_BITS = 1; //1 bit (black or white)
public void loadImage(String imagePath) {