Skip to content

Instantly share code, notes, and snippets.

View Dyndrilliac's full-sized avatar

Matthew Boyette Dyndrilliac

View GitHub Profile
@Dyndrilliac
Dyndrilliac / twos-complement.js
Created March 11, 2016 01:19 — forked from bsara/twos-complement.js
A simple function that returns the two's complement binary representation of a given number
/**
* @param {Number} value
* @param {Number} [bitCount = 0]
*
* @returns {String} binary representation of the two's complement of `value`.
*/
function twosComplement(value, bitCount) {
let binaryStr;
if (value >= 0) {
@Dyndrilliac
Dyndrilliac / gist:a95f4b42bd4aab7ccda4
Created March 19, 2016 07:46 — forked from davidbalbert/gist:6815258
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
# First, enable SSH in the Administration->System tab.
# Then log in to the device.
# Verify that https_crt_save is off
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save
0
# Enable https_crt_save and verify that it was set correctly
admin@RT-N66U:/tmp/home/root# nvram set https_crt_save=1
admin@RT-N66U:/tmp/home/root# nvram get https_crt_save
@Dyndrilliac
Dyndrilliac / fix_drupal_settings_permissions.sh
Last active November 7, 2016 23:31
Frequently Used Commands for cen-4010-assignments
#!/bin/bash
#########################################
# Fix Drupal Settings Permissions #
# Author: Dyndrilliac (Matthew Boyette) #
# Date: 11/07/2016 #
#########################################
sudo chmod 755 /var/www/html/sites/default/settings.php
@Dyndrilliac
Dyndrilliac / git-duplicate.sh
Last active November 7, 2016 23:32
Frequently Used Commands for Git
#!/bin/bash
#########################################
# Git Remote Duplication Script #
# Author: Dyndrilliac (Matthew Boyette) #
# Date: 09/10/2016 #
#########################################
git checkout master
git remote add drupal $1
git push drupal master
@Dyndrilliac
Dyndrilliac / MatthewStyle.xml
Created November 29, 2016 08:08
My Eclipse Java Formatting Settings
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Matthew" version="12">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
@Dyndrilliac
Dyndrilliac / PrimeTest.java
Last active March 22, 2017 08:45
PrimeTest
import api.util.Mathematics;
public class PrimeTest
{
public static void main(String[] args)
{
int n = -4;
StdOut.println(Mathematics.isEven(n)); // true
StdOut.println(Mathematics.isPrime(n)); // false
@Dyndrilliac
Dyndrilliac / data_init.js
Last active April 26, 2017 03:53
COP-4813-Final-Project
const BASE_URL = "proxy/api/v2/"
const URLS = {
ENDPOINTS: BASE_URL,
DAYSOFWEEK: BASE_URL + "daysofweek/",
EQUIPMENT: BASE_URL + "equipment/",
EXERCISE: BASE_URL + "exercise/",
EXERCISEINFO: BASE_URL + "exerciseinfo/",
EXERCISECATEGORY: BASE_URL + "exercisecategory/",
EXERCISECOMMENT: BASE_URL + "exercisecomment/",
EXERCISEIMAGE: BASE_URL + "exerciseimage/",