Skip to content

Instantly share code, notes, and snippets.

View siberianbear's full-sized avatar
🌏
Working from Earth right now

Alexander siberianbear

🌏
Working from Earth right now
  • Freelance
  • Russia, Siberia
  • 05:26 (UTC +07:00)
View GitHub Profile
package org.ygl.openrndr.demos
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.BlendMode
import org.openrndr.draw.DrawPrimitive
import org.openrndr.draw.VertexElementType
import org.openrndr.draw.renderTarget
import org.openrndr.draw.shadeStyle
import org.openrndr.draw.vertexBuffer
@LeCoupa
LeCoupa / tailwind_cheatsheet.css
Last active July 2, 2024 13:38
Tailwind CSS CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* TAILWIND.CSS
* DOCUMENTATION: https://tailwindcss.com/
* ******************************************************************************************* */
/*
* Available breakpoints
* --------------------
* sm: min-width: 640px;
* md: min-width: 768px;
@emxsys
emxsys / webworldwind-example.html
Last active November 1, 2022 22:40
A complete 3D virtual globe example - HTML, JavaScript and CSS - using ESA-NASA Web WorldWind, Bootstrap and KnockoutJS featuring a 3D globe view, 2D map projections, markers and place name finder. Simply download and open this HTML file in your browser to run the app, or see http://worldwind.earth/sample-app.html for a preview and write-up.
<!DOCTYPE html>
<html lang="en">
<!--
A sample framework for the ESA-NASA WebWorldWind web applications.
Author: Bruce Schubert
License: MIT
See: https://worldwind.arc.nasa.gov/web/
-->
<head>
<meta charset="utf-8">
@bluenex
bluenex / how-to-run.md
Last active October 11, 2023 09:04
Guide to run script on terminal in the background with log.

Running in the background

This command can be applied to anything run on cli, for example bash script and python script.

Two ways to do

There are two ways to run process in the background, nohup and & (ampersand).

Steps

@vankasteelj
vankasteelj / sec2time.js
Last active February 2, 2024 11:08
Javascript - Seconds to Time (hh:mm:ss,ms) -> sec2time(593.685038) becomes 00:09:53,685
function sec2time(timeInSeconds) {
var pad = function(num, size) { return ('000' + num).slice(size * -1); },
time = parseFloat(timeInSeconds).toFixed(3),
hours = Math.floor(time / 60 / 60),
minutes = Math.floor(time / 60) % 60,
seconds = Math.floor(time - minutes * 60),
milliseconds = time.slice(-3);
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3);
}
@nathanstilwell
nathanstilwell / apple-devices.less
Last active October 10, 2016 16:55
iPhone Media Queries
//
// Ok look, I know this is a bad idea but I'm doing this as an experiment. I'm going to get really granular with these,
// which makes them basically unsuable. But it gives a decent overview of the diversity of iThangs.
// So chill.
//
// References:
// http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-device-pixel-ratio
// http://stephen.io/mediaqueries/
//
@wilddeer
wilddeer / flexbox-adventures.md
Last active November 29, 2018 05:54
Невероятные приключения флексбокса в фаерфоксе

Невероятные приключения флексбокса в фаерфоксе

  • Блок с прокруткой в вертикальном флексбоксе не работает — ставить max-height: 100% на контейнер
  • word-wrap: break-word не работает внутри флексбокса — спасает min-width: 0 на элементе флексбокса (overflow-x: hidden тоже работает)
  • Флексбокс не работает на кнопке — класть внутрь блок и на нем делать флексбокс
  • Элемент флексбокса с ellipsis расфигачивает все по ширинеmin-width: 0 на флексбокс / max-width: 100% на самого верхнего разъехавшегося родителя
  • Элементы флексбокса не выравниваются по базовой линии, если внутри еще один флексбокс — использовать inline-flex

О других невероятных приключениях вы узнаете в следующей серии

@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@talmand
talmand / bootstrap-carousel.html
Created March 21, 2014 20:22
CSS changes to Bootstrap's Carousel so that the indicator dots are now thumbnails.