Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
# try | |
# 48kbit/s for Dialup | |
# 64kbit/s for Edge | |
# 384kbit/s for 3G | |
# 768kbit/s for DSL | |
# 1572kbit/s for T1 | |
# | |
# to simulate low bandwidths. | |
# | |
# And: You can play with the delay option. |
<!doctype html> | |
<!-- | |
WARNING! | |
You probably shouldn't use this technique since images never show up | |
if the script isn't loaded for one reason or another. Some reasons: | |
- The content is viewed using a RSS reader | |
- The content is viewed with a read-it-later service | |
- The user has a flaky connection (hotel wifi, Dutch train, etc) | |
--> |
@mixin retina($ratio: 1.5) { | |
$dpi: $ratio * 96; | |
$opera-ratio: $ratio * 100; | |
@media only screen and (-webkit-min-device-pixel-ratio: #{$ratio}), | |
only screen and ( -o-min-device-pixel-ratio: '#{$opera-ratio}/100'), | |
only screen and ( min-resolution: #{$dpi}dpi), | |
only screen and ( min-resolution: #{$ratio}dppx) { | |
@content; | |
} |
FROM racket/racket:8.1-full AS build | |
WORKDIR /src/my-project | |
RUN raco pkg config --set catalogs \ | |
https://download.racket-lang.org/releases/8.1/catalog/ \ | |
https://racksnaps.defn.io/snapshots/2021/05/27/catalog/ | |
RUN raco pkg install --auto --batch $ALL_THE_PACKAGES_I_NEED | |
COPY . /src/my-project | |
RUN raco test -x . | |
RUN raco exe --vv ++lib $DYNAMIC_REQUIRE_LIBS -o my-project main.rkt |
import Events from 'eventemitter3'; | |
const modelMixin = Object.assign({ | |
attrs: {}, | |
set (name, value) { | |
this.attrs[name] = value; | |
this.emit('change', { | |
prop: name, | |
value: value |
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |