Skip to content

Instantly share code, notes, and snippets.

View JanGalek's full-sized avatar
😈
Time to work!

Jan Galek JanGalek

😈
Time to work!
View GitHub Profile
@JanGalek
JanGalek / UbuntuSetup.md
Last active August 18, 2024 09:52
UbuntuSetup

.ssh Permisions

  • .ssh directory 700 (drwx------)
  • public key (.pub file) 644 (-rw-r--r--)
  • private key (id_rsa) 600 (-rw-------)
  • lastly your home directory should not be writeable by the group or others (at most 755 (drwxr-xr-x)).

zsh fix for snap, ...

@unzeitigm
unzeitigm / nette-ajax-extensions.js
Last active June 6, 2018 09:17
Nette Ajax extensions to disable a button during ajax request
(function ($) {
let Spinner = new window.Spinner();
$.nette.ext('trigger-spinner', {
before: function (jqXHR, settings) {
if (!this.validRequest(settings)) {
return;
}
@unzeitigm
unzeitigm / .htaccess
Last active March 16, 2018 12:23
Website Maintenance Mode
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maintenance\.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css|js|tff|woff) [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/maintenance.html [R=307,L]
@akadlec
akadlec / simple.start.md
Last active January 11, 2018 13:52
iPub:WebSockets!

iPub:WebSockets! - websockety snadno a rychle

Začátek je jednoduchý, ostatně jako u všech ostatních rozšíření pro Nette framework. Ještě ale než budeme instalovat rozšíření, je potřeba se rozhodnout který typ web socketů budeme chtít implementovat.

  • iPub:WebSocketsMessage! - jednoduché řešení
  • ipub:WebSocketsWAMP! - implementace WAMP (Websocket Application Messaging Protocol) ktetrý přináší pokročilejší způsoby komunikace

Toto rychlé how-to se bude podrobněji zabývat druhou možností a tedy iPub:WebSocketsWAMP!

Server a základní příprava

@ravibhure
ravibhure / git_rebase.md
Last active November 9, 2024 05:19
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@guillemcanal
guillemcanal / docker-alpine-iconv.md
Created August 9, 2016 13:03
Build the PHP 5 iconv extension from source for Alpine

Build PHP5 iconv extension from source for Alpine

If you plan to use iconv() to transliterate string in you PHP project, please, take this:

FROM alpine:3.4

RUN apk add --update php5-cli wget build-base php5-dev autoconf re2c libtool \
@duskohu
duskohu / spinner.css
Created November 21, 2013 22:44
Spinner extension for nette.ajax.js
#ajax-spinner {
position: fixed;
width: 32px;
height: 32px;
/* - use if you use bacground image, no ico */
/*background: url('../img/ajax_loader.gif') no-repeat;*/
z-index: 123456;
color: green;
}