Skip to content

Instantly share code, notes, and snippets.

@jdspiral
jdspiral / custom-radio-button.css
Created June 6, 2024 13:37
Custom Radio Button
/* Default color */
input[type="radio"] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
width: 20px; /* Adjust the size of the radio button */
height: 20px; /* Adjust the size of the radio button */
border-radius: 50%;
border: 2px solid #ccc; /* Change this to the default color */
position: relative;
@jdspiral
jdspiral / .vimrc
Created January 13, 2021 15:58
Vim Style
syntax on
:colorscheme desert
:set number
:set tabstop=4
inoremap jk <ESC>
let mapleader = "\<SPACE>"
set encoding=utf-8
@jdspiral
jdspiral / .bash_profile
Last active January 13, 2021 16:15
Bash Profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\] \$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
alias ll='ls -l'
alias gco='git checkout'
@jdspiral
jdspiral / gist:fef5edbccff6a27a46ddde7781293219
Created August 28, 2019 23:47
Check for dirty reactive form values
public getDirtyValues(form: any) {
let dirtyValues = {};
Object.keys(form.controls).forEach(key => {
const currentControl = form.controls[key];
if (currentControl.dirty) {
if (currentControl.controls) {
dirtyValues[key] = this.getDirtyValues(currentControl);
} else {
dirtyValues[key] = currentControl.value;
@jdspiral
jdspiral / README-Template.md
Created June 21, 2018 20:08 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jdspiral
jdspiral / Button.js
Created October 18, 2017 17:40
Create Custom Button Colors
import React, { Component } from 'react';
import {
Text,
TouchableOpacity
} from 'react-native';
const Button = (props) => {
const { button, text } = styles;
return (
function fireEvent(element,event)
{
if (document.createEventObject)
{
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt);
}
else
{
@jdspiral
jdspiral / secret.php
Last active March 2, 2016 01:27
Determine if secret() is additive or not.
<?php
/**
*
* Author: Josh Hathcock
*
* You are given a function 'secret()' that accepts a single integer parameter and returns an integer. In your
* favorite programming language, write a command-line program that takes one command-line argument (a number)
* and determines if the secret() function is additive [secret(x+y) = secret(x) + secret(y)], for all
* combinations x and y, where x and y are all prime numbers less than the number passed via the command-line
* argument. Describe how to run your examples. Please generate the list of primes without using built-in
@jdspiral
jdspiral / email-field-validation.js
Created October 20, 2015 17:32
If email field is filled out, make sure it is validated
jQuery(document).ready( function() {
jQuery('.refer form').submit( function(){
return validateForm(this);
});
});
jQuery(document).ready( function() {
jQuery('#questionsContent form').submit( function(){
return validateForm(this);
});
});