Skip to content

Instantly share code, notes, and snippets.

View farrukhsubhani's full-sized avatar
💭
Excited

Farrukh Subhani farrukhsubhani

💭
Excited
View GitHub Profile
@brianarn
brianarn / oneweirdtrick.md
Last active October 22, 2020 23:04
One Weird Trick to never missing a console.log's output

One Weird Trick to never missing a console.log's output

Friends! Have you ever been developing, littered your code with console statements, and then realized you couldn't find what you were looking for? Have you ever wondered, "How can I make this console.log statement stand out in a crowd?"

WONDER NO MORE!

You can provide a special %c prefix to your logged string, and then all magical and printf-like, you can then provide some CSS to style up that line!

Here's a couple of examples that I was JUST using!

@TheMcMurder
TheMcMurder / index.html
Last active March 14, 2023 17:51
Convert SVG file from absolute to relative
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js" charset="utf-8"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<div class="page-header">
<center>
@d3noob
d3noob / leanpubdownloads.html
Last active December 20, 2015 22:09
Leanpub book data investigations
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>dc.js Experiment</title>
<script src='js/d3.v3.js' type='text/javascript'></script>
<script src='js/crossfilter.js' type='text/javascript'></script>
<script src='js/dc2.js' type='text/javascript'></script>
@tommaybe
tommaybe / LICENSE.md
Last active November 20, 2020 04:12
Day / Hour Heatmap

Copyright (c) 2016, Tom May

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH

@dk8996
dk8996 / example.css
Last active May 31, 2019 13:03
D3.js Gantt Chart, example 3
html,body,#wrapper {
width: 100%;
height: 100%;
margin: 0px;
}
.chart {
font-family: Arial, sans-serif;
font-size: 12px;
}
public override int SaveChanges()
{
//this goes through and updates the created on / modified on dates.
this.ChangeTracker.Entries<BaseModel>().ForEach(x =>
{
if (x.State == System.Data.EntityState.Added)
{
x.Entity.CreatedOn = DateTime.UtcNow;
}