Skip to content

Instantly share code, notes, and snippets.

View mainiak's full-sized avatar

Jakub Viták mainiak

View GitHub Profile
@brigand
brigand / nickname.md
Created March 9, 2016 07:45
Freenode Setting Up Your Nickname

What is the recommended way to set up my IRC nickname?

Please follow these steps to set up your nick and configure your client. Check off each step to make sure it's been done:

Select a permanent, master nickname. If the nickname you want is registered but has expired, just ask a staffer and in most cases, we will be happy to drop it for you.

Please avoid using the name of a community project or trademarked entity, to avoid conflicts. Write down your password and be sure to keep the sheet of paper in a safe place.

Register your IRC nick:

@nemotoo
nemotoo / .gitattributes
Last active May 13, 2025 15:16
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active May 2, 2025 01:17
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@alces
alces / ansible_local_playbooks.md
Last active May 6, 2025 11:00
How to run an Ansible playbook locally
  • using Ansible command line:
ansible-playbook --connection=local 127.0.0.1 playbook.yml
  • using inventory:
127.0.0.1 ansible_connection=local
@jirutka
jirutka / README.adoc
Last active May 6, 2023 17:38
Script for periodical synchronization of data (e.g. mirrors) using rsync

Files

  • /etc/periodic/15min/sync-mirror-alpine → /usr/local/bin/sync-mirror (symlink)

  • /etc/sync-mirror.d/alpine.conf

  • /usr/local/bin/sync-mirror

  • /var/www/mirrors/alpine

@jesperorb
jesperorb / cors.md
Last active February 21, 2024 14:17
Handle CORS Client-side

Handle CORS Client-side

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.

Sources : MDN - HTTP Access Control | Wiki - CORS

CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:

Access-Control-Allow-Origin
@int128
int128 / README.md
Last active May 6, 2025 12:59
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

@asukakenji
asukakenji / 0-go-os-arch.md
Last active May 16, 2025 01:16
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@janeczku
janeczku / 00-cloud-config.yml
Last active December 2, 2024 01:28
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@StefansArya
StefansArya / moment.loadLocale.js
Last active March 31, 2020 04:26
Dynamically load locale for moment.js
;(function(){
if(window.moment === void 0)
return console.error("Moment.js must be loaded first");
var cdnLink = 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/locale/';
var loaded = new Set();
var available = ['af','ar-dz','ar-kw','ar-ly','ar-ma','ar-sa','ar-tn','ar','az','be','bg','bm','bn','bo','br','bs','ca','cs','cv','cy','da','de-at','de-ch','de','dv','el','en-au','en-ca','en-gb','en-ie','en-il','en-nz','en-SG','eo','es-do','es-us','es','et','eu','fa','fi','fo','fr-ca','fr-ch','fr','fy','ga','gd','gl','gom-latn','gu','he','hi','hr','hu','hy-am','id','is','it-ch','it','ja','jv','ka','kk','km','kn','ko','ku','ky','lb','lo','lt','lv','me','mi','mk','ml','mn','mr','ms-my','ms','mt','my','nb','ne','nl-be','nl','nn','pa-in','pl','pt-br','pt','ro','ru','sd','se','si','sk','sl','sq','sr-cyrl','sr','ss','sv','sw','ta','te','tet','tg','th','tl-ph','tlh','tr','tzl','tzm-latn','tzm','ug-cn','uk','ur','uz-latn','uz','vi','x-pseudo','yo','zh-cn','zh-hk','zh-tw'];
moment.lo