Skip to content

BitBook

  • Online Tools
  • Dev
  • Sysadmin
  • Reviews
  • Machine Learning
  • Home
  • Page 3

Validating JSON

December 11, 2018 mike PHP

The PHP json_decode function will return a strict null if the string passed into it is invalid json or it can’t parse it successfully. The

Using Create/Select to Create a New Table From Another

December 8, 2018 mike MySQL

In a single statement you can copy the structure and data from one table in MySQL and populate the results of a query into the

emojis in html

How to use emoji’s on your website

December 7, 2018 mike HTML & UI

The proper way to use emojis on you’re site is to use the HTML unicode characters. Just copy and paste them into your html. You’ll

Function To Remove All Cookies For The Domain

December 6, 2018 mike PHP

This PHP function will delete all valid cookies for a domain. We’re also sanitizing the cookie variable names from invalid characters.

String Concatenation Using concat Function

December 5, 2018 mike MySQL

Unlike SQL Server, String concatenation works using a function. It’s a simple function that you pass comma separated values into in the order you want

How to do Email Validation

December 4, 2018 mike PHP

Using the PHP filter_var function we can test email addresses for valid format and only unicode characters. Example usage below.

Query using Avg Ignoring Certain Values

December 3, 2018 mike MySQL

In this case we want to get the average of values but we also want to ignore certain values, say if when the deviceType column

Replace All Characters In a String that Aren’t Alphanumeric

November 30, 2018 mike PHP

Using the preg_replace function you can easily replace all characters in a string that are not alphanumeric. This can be useful for sanitizing a string

Fix SSH Key Permissions (Permissions are too open private key will be ignored)

November 26, 2018 mike Sysadmin

Sometimes you’ll get an error on your ssh client when you’re working with a new ssh key and you’re trying to ssh into the server.

Listing Files Only With Grep Command

August 5, 2018 mike Sysadmin

To only show the file names and not a preview of data add the command line param -l to grep. The below example searches in

Posts navigation

«Previous Posts 1 2 3 4 5 … 14 Next Posts»

Bitbook

  • About
  • Privacy Policy
  • Terms of Service