Skip to content

Instantly share code, notes, and snippets.

View jkuhnert's full-sized avatar

Jesse Kuhnert jkuhnert

View GitHub Profile
@paulirish
paulirish / readme.md
Last active April 2, 2024 20:18
resolving the proper location and line number through a console.log wrapper

console.log wrap resolving for your wrapped console logs

I've heard this before:

What I really get frustrated by is that I cannot wrap console.* and preserve line numbers

We enabled this in Chrome DevTools via blackboxing a bit ago.

If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.

@simhanature
simhanature / SortUsingDifferentArray
Created December 9, 2014 07:06
Sort an array based on another array
import java.util.Arrays;
import java.util.Comparator;
public class TestSort {
private static void printTable(String caption, Integer[] orderArray,
Integer[] arrayToBeSorted, Integer[] sortOrder){
System.out.println(caption+
"\nNo Num Color"+
"\n----------------");
package com.sinfonier.drains;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.Host;
@keysRB
keysRB / Application.java
Created November 2, 2014 02:26
Printing an envelope..How to pass variables?
//Purpose: Print a letter to yourself stating your name and address. Formatting should be included around info.
import java.util.Scanner;
public class LetterToYourself {
public static void main(String[] args) {
boolean exit = false;
do {
LetterFormat getInput = new LetterFormat();
getInput.getInput(); // Get user input
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 5. in line 1.
,street-1,street-2,city,state,zip
Suite 300,11350 Random Hills Road,Fairfax,VA,22030
3625 CORNELL ROAD,,FAIRFAX,VA,22030
3625 CORNELL ROAD,,FAIRFAX,VA,22030
1330 Mercer Lane,,McLean,VA,22101
Suite 225,333 South Glebe Road,Arlington,VA,22204
71 WEST FIRST AVENUE,POST OFFICE BOX 430,ALBERTA,VA,23821
5221 INDIAN RIVER RD,,VIRGINIA BEACH,VA,23464
1045 COFFEE RD,,LYNCHBURG,VA,24503
1919 GABLES LANE,,VIENNA,VA,22182
@kinichiro
kinichiro / 1 test_pstat_getdynamic.c
Created August 13, 2014 08:04
sample code for pstat_getdynamic()
/* test_pstat_getdynamic.c */
#include <stdio.h>
#include <sys/pstat.h>
int main() {
struct pst_dynamic buf;
if(pstat_getdynamic(&buf, sizeof(buf), 1, 0) != 1) {
perror("pstat_getdynamic()");
return -1;
@vicapow
vicapow / README.md
Last active April 5, 2023 12:45
getStyles function from NYT's Crowbar

Get all the styles as a string from a given document. useful for creating a PNG from an SVG. SVG's need to have all of their style information embedded within their document to be properly exported.

Example usage:

var styles = getStyles(window.document);

Try it by going to [http://bl.ocks.org/vicapow/raw/9904319/](this block) and running the above usage example in the console.

@mbostock
mbostock / .block
Last active September 30, 2016 16:15
Reprojecting CSV with ogr2ogr
license: gpl-3.0
@Fhernd
Fhernd / CuadradoCubo.java
Created July 7, 2014 16:31
Cálculo del cuadrado y el cubo de 11 números enteros.
import java.util.Scanner;
// Clase definida por el programador
public class CuadradoCubo
{
// Método de clase
public static void main( String[] args )
{
System.out.printf( "\n Número\tCuadrado\tCubo" );
System.out.printf( "\n %d\t %d\t %d", 0 , ( 0 * 0 ) , ( 0 * 0 * 0 ) );
@LeaVerou
LeaVerou / dabblet.css
Created July 5, 2014 14:05
Super-customizable dashed text underlines
/**
* Super-customizable dashed text underlines
* inspired by https://medium.com/designing-medium/crafting-link-underlines-on-medium-7c03a9274f9
* hover over them too!
*/
body {
width: 8.4em;
padding: 1em;
font: 300%/1.4 Baskerville, Palatino Linotype, serif;