This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
######################################### | |
# Fix Drupal Settings Permissions # | |
# Author: Dyndrilliac (Matthew Boyette) # | |
# Date: 11/07/2016 # | |
######################################### | |
sudo chmod 755 /var/www/html/sites/default/settings.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/", |