Skip to content

Instantly share code, notes, and snippets.

View jasonsemko's full-sized avatar

Jason jasonsemko

  • Santa Monica, CA
View GitHub Profile
/**
* PowerReviews, Copyright 2019
* HEAD | d3227477c | 2/13/2019
*/
.p-w-r {
display: block!important
}
.p-w-r a,
function changeCase(identifier, targetCase){
if(identifier.length === 0) { return "" }
if(!targetCase.match(/^(snake|kebab|camel)$/)) { return undefined }
var replaceCapsWithStars = identifier.replace(/[A-Z]/g, '*')
if(new Set(replaceCapsWithStars.match(/[_\-\*]/g)).size > 1) { return undefined }
identifier = identifier.replace(/[A-Z]/g, (match) => '-' + match.toLowerCase())
identifierArray = identifier.split(/[_\-]/g)
<span style="font-weight:bold;color:blue;">hello</span>
2014-06-18 01:31:29,620 DEBUG [ajp-las1.vmplappp31%2F10.53.69.20-8009-6] [DisclaimerFilteringResponseStreamFactory.java:103] Releasing connection...
2014-06-18 01:31:31,620 DEBUG [ajp-las1.vmplappp31%2F10.53.69.20-8009-14] [IpAddressExtractorImpl.java:47] inside ip address extractor. Header request 63.159.249.70
2014-06-18 01:31:31,621 DEBUG [ajp-las1.vmplappp31%2F10.53.69.20-8009-14] [IpAddressExtractorImpl.java:51] Parsed address : 63.159.249.70
2014-06-18 01:31:31,621 INFO [ajp-las1.vmplappp31%2F10.53.69.20-8009-14] [ResourceClientExecutor.java:108] Loading resource http://rp.lexus.com/quova/v1/ipinfo/63.159.249.70?format=json&apiKey=220.1.51dde329e4b02ff9865ce681.5itGmvr5n&sig=97e2346105606687b7de2f9513e07b54
2014-06-18 01:31:31,679 INFO [ajp-las1.vmplappp31%2F10.53.69.20-8009-14] [ResourceClientExecutor.java:124] Request to http://rp.lexus.com/quova/v1/ipinfo/63.159.249.70?format=json&apiKey=220.1.51dde329e4b02ff9865ce681.5itGmvr5n&sig=97e2346105606687b7de2f9513e07b54 completed in 57ms
2014-06-18 01:31:3
@jasonsemko
jasonsemko / gist:9125266
Created February 20, 2014 23:10
FX Javascript Validation
/**
* This file contains the logic for all of the basic form validation across the site.
* For validation we are using the
*
* jQuery Validation Plugin
*
* http://jqueryvalidation.org/
*
* @author Jason Semko
*/
wget -r -e robots=off --level=inf -p -nd -A jpg,png,gif,jpeg --span-hosts=on --domains=tempurpedic.cachefly.net,www.tempurpedic.com -P ./tempur www.tempurpedic.com
@jasonsemko
jasonsemko / gist:6803968
Created October 3, 2013 02:47
Flying Birds
Claim: Not all birds can fly.
Assume all birds b can fly fly()
∀b(fly(b))
However, chickens cannot fly, so the statement is false as:
∃b(¬fly(b))
fatal: remote error: Repository does not exist
The requested repository does not exist, or you do not have permission to
access it.
@jasonsemko
jasonsemko / karger
Last active December 20, 2015 03:39
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
public class KragerMinCut {
public static int lineCount = 1;
public static int prevMinSize = 100;
public static void main(String[] args) throws IOException {
//The different between the two is the ^ and $...I'd assume the entire string is evaluated as one but this doesn't seem to be the case.
//Why does this alert true?...if there anything not a-z I expected a false
alert(/[A-z]*/gm.test("Hell7o"));
//This is what I expected from the above
alert(/^[A-z]*$/gm.test("Hell7o"));