Skip to content

Instantly share code, notes, and snippets.

🚁
Latam po mieście

Piotr Kowalski piecioshka

🚁
Latam po mieście
Block or report user

Report or block piecioshka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@piecioshka
piecioshka / shortcuts.md
Last active Aug 10, 2019
Terminal shortcuts (espacially for macOS)
View shortcuts.md

Terminal shortcuts

  • ctrl + t — move current char backward
  • ctrl + e — move to the end
  • ctrl + p — move to the end
  • ctrl + n — move to the end
  • ctrl + d — the same as [delete]
  • ctrl + h — the same as [backspace]
  • ctrl + b — the same as [left arrow]
  • ctrl + f — the as [right arrow]
View tweets.schema.json
{
"id": "tweets",
"type": "object",
"required": [
"tweets"
],
"properties": {
"tweets": {
"type": "array",
"minItems": 5,
@piecioshka
piecioshka / launch.json
Created May 16, 2019
Enable debugging tests in Visual Studio Code
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Unit test",
"program": "${workspaceFolder}/node_modules/.bin/jasmine",
"args": [
"test/**/*.js"
View snippet.bash
#!/bin/bash
set -o errexit # Exit on error
git stash save 'Before deploy' # Stash all changes before deploy
git checkout deploy
git merge master --no-edit # Merge in the master branch without prompting
npm run build # Generate the bundled Javascript and CSS
if $(git commit -am Deploy); then # Commit the changes, if any
echo 'Changes Committed'
View posts.schema.json
{
"id": "posts",
"type": "object",
"required": [
"posts"
],
"properties": {
"posts": {
"type": "array",
"minItems": 5,
@piecioshka
piecioshka / snippet.bash
Created Mar 11, 2019
[number of max processes]
View snippet.bash
# max user processes — linux, macos
ulimit -a
# max system processes — linux
cat /proc/sys/kernel/pid_max
View photos.schema.json
{
"id": "photos",
"type": "object",
"required": [
"photos"
],
"properties": {
"photos": {
"type": "array",
"minItems": 20,
View products.schema.json
{
"id": "products",
"type": "object",
"required": ["products"],
"properties": {
"products": {
"type": "array",
"minItems": 50,
"items": {
"type": "object",
@piecioshka
piecioshka / snippet.js
Last active Mar 11, 2019
Shim for jQuery.not() #jQuery
View snippet.js
const element = $('.file-box:nth-child(2)')
const list = $$('.file-box')
function not($list, element) {
const list = Array.from($list);
const index = list.indexOf(element);
return list.slice(index);
}
Array.from(not(list, element))
@piecioshka
piecioshka / statuses.log
Last active Mar 11, 2019
Projects statuses
View statuses.log
REC - Recommendation
PR - Proposed Recommendation
CR - Candidate Recommendation
WD - Working Draft
ED - Editor's Draft
WIP - Worki In Progress
You can’t perform that action at this time.