Skip to content

Instantly share code, notes, and snippets.

View kruzyk's full-sized avatar
🕵️‍♂️
a day is too short

Jacek Krużycki kruzyk

🕵️‍♂️
a day is too short
View GitHub Profile
@jscher2000
jscher2000 / showAsPrint.js
Last active March 26, 2024 10:50
Emulate print media in Firefox 62 (userscript work in progress)
// For Firefox's Web Console, creates the functions showAsPrint() and undoShowAsPrint()
// to roughly emulate print media and revert
function showAsPrint(){
var docSS = document.styleSheets, ss, oldMedia, newMedia, rules;
var p2s = function(media){
if (media.indexOf('all') > -1) return media; //no need to change
if (media == 'print') return 'all, wasprint'; //show on screen, too
if (media.indexOf('print') > -1 && media.indexOf('screen') > -1) return media; //no need to change
if (media == 'screen') return 'wasscreen'; //hide these rules
if (media.indexOf('screen') > -1) return media.replace('screen', 'wasscreen'); //hide these rules
@cytrowski
cytrowski / config.md
Created September 16, 2018 10:17 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@michalczukm
michalczukm / vscode-extensions.sh
Last active May 4, 2020 18:22
Visual Studio Extensions list and short script to build installable list
##!/bin/bash
# ======= Generate extensions list by:
#code --list-extensions | while read line; do
# echo code --install-extension $line
#done
# ======== My current extensions listcode --install-extension DSKWRK.vscode-generate-getter-setter
code --install-extension akamud.vscode-theme-onedark
code --install-extension alefragnani.Bookmarks
code --install-extension Angular.ng-template

Polecenia konsoli Linux

Operacje na plikach i katalogach

  • pwd - aktualny katalog
  • ls -la - listuje wszystkie dostępne pliki
  • ls -lat - listuje wszystkie dostępne pliki posortowane według czasu modyfikacji
  • cp -r {nazwa pliku/katalogu} {miejsce docelowe} - kopiuje plik lub cały katalog z zawartością we wskazane miejsce
  • mv {nazwa pliku/katalogu} {miejsce docelowe} - przenosi plik lub cały katalog z zawartością we wskazane miejsce (jeśli lokalizacja pliku docelowego jest taka sama jak pliku do przeniesienia, zmienia nazwę)
  • du -sh - pokazuje zajętość całego katalogu
  • du -sh * - pokazuje rozmiar poszczególnych plików i katalogów
@cytrowski
cytrowski / polecenia_git.md
Created November 22, 2017 18:36 — forked from chajr/polecenia_git.md
Polecenia GIT

Przydatne polecenia GIT

  • git init - inicjalizuje repozytorium GIT w katalogu
  • git clone {adres repozytorium} - klonuje repozytorium do katalogu
  • git status - pokazuje status repozytorium (pokazuje informację o zmodyfikowanych, nowych, usuniętych oraz nie należące do repozytorium plikach)
  • git remote add {jakaś nazwa} {adres repozytorium} - dodaje repozytorium innego użytkownika (git remote add upstream https://github.com/bluetree-service/idylla.git)
  • git remote -v lista wszystkich zewnetrznych repozytoriów
  • git remote rm {nazwa dla remota} - usuwa zewnętrzne repozytorium
  • git fetch {nazwa remota} - pobiera listę zmian z innego repozytorium (w tym pokazuje nowe gałęzie)
  • git branch - lista gałęzi w repozytorium
@robertknight
robertknight / using-nvda-in-a-windows-vm-on-mac.md
Created July 3, 2017 13:23
Testing the Windows screenreader NVDA on a Mac

How to test NVDA screen reader behaviour on a Mac:

  1. Download Microsoft Edge VM from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
  2. Download Virtualbox and import the Edge VM image.

Then in the VM:

  1. Install guest addons in the VM
  2. Download & install latest NVDA from nvaccess.org
  3. Download & install SharpKeys and use it to map left an alternative key (eg. Left Ctrl) to the Insert key. This is needed because Macs do not typically have an “Insert” key which is the prefix for many NVDA commands.
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@albertbori
albertbori / Installation.md
Last active July 15, 2024 15:33
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 22, 2024 22:13
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@alexeds
alexeds / move-stashes.md
Created September 5, 2012 18:00
Move your stashes from one repo to another

Move your stashes from one repo to another


This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.

Download your stashes

git stash show -p > patch

You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.