Skip to content

Instantly share code, notes, and snippets.

@ChrisAntaki
ChrisAntaki / hackerrank-data.js
Last active September 29, 2016 15:07
Simplifies data collection and parsing for JavaScript coding challenges on HackerRank.com
function solve(data) {
let buffer = '';
// Have fun! :)
console.log(buffer.trim());
}
// Hybrid
class Data {
@ChrisAntaki
ChrisAntaki / game.html
Created March 11, 2015 07:12
Full screen Unity HTML
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Pico!</title>
<script type='text/javascript' src='https://ssl-webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/jquery.min.js'></script>
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
@ChrisAntaki
ChrisAntaki / AttributeSelectors.css
Last active August 29, 2015 14:16
CSS - Attribute Selectors
element[attribute] {
/* Attribute exists */
}
element[attribute="value"] {
/* Attribute equals value */
}
element[attribute^="value"] {
/* Attribute starts with value */
@ChrisAntaki
ChrisAntaki / LayersToSpriteSheet.js
Last active December 4, 2024 17:54
Photoshop: Layers To Sprite Sheet
// Notes:
// 1. Save this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// 2. Run the script by going to menu File > Scripts > LayersToSpriteSheet
// Based on http://alessandroituarte.com/blag/2012/07/03/470
if (documents.length > 0) {
// Adjust this to the number of columns you want
// leave -1 if you want it to calculate an optimal column value.
@ChrisAntaki
ChrisAntaki / AJAX.js
Created February 25, 2015 18:50
AJAX.js
function AJAX(params) {
this.async = params.async || true;
this.data = params.data;
this.error = params.error;
this.form = params.form;
this.method = params.method || 'GET';
this.success = params.success;
this.url = params.url;
this.request = new XMLHttpRequest();
@ChrisAntaki
ChrisAntaki / reset.css
Created December 13, 2014 10:28
reset.css
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
@ChrisAntaki
ChrisAntaki / Preferences.sublime-settings
Last active August 29, 2015 14:05
Preferences.sublime-settings
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"default_line_ending": "unix",
"dictionary": "Packages/Language - English/en_US.dic",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
"node_modules"
],
"font_size": 18,