Skip to content

Instantly share code, notes, and snippets.

View d4rkm3z's full-sized avatar
🧭
You gotta keep an open mind

Kirill Sadovnikov d4rkm3z

🧭
You gotta keep an open mind
View GitHub Profile
@d4rkm3z
d4rkm3z / README.md
Created December 29, 2015 13:17 — forked from magnetikonline/README.md
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@d4rkm3z
d4rkm3z / ultimate-ut-cheat-sheet.md
Created October 31, 2016 16:26 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@d4rkm3z
d4rkm3z / setup_proxychains-ng.sh
Created April 8, 2017 19:52 — forked from marcinwol/setup_proxychains-ng.sh
Setup and test proxychains-ng on Ubuntu 14.04
# if you havent done it yet, please download the tor-browser and start it
# https://www.torproject.org/download/download-easy.html.en
wget https://www.torproject.org/dist/torbrowser/5.0/tor-browser-linux64-5.0_en-US.tar.xz
tar xf tor-browser-linux64-5.0_en-US.tar.xz
# download the source of proxychains-ng
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
@d4rkm3z
d4rkm3z / selenium
Created June 6, 2017 16:10 — forked from adeubank/selenium
Set up selenium on Ubuntu 16.04 as a service
#!/bin/bash
case "${1:-''}" in
'start')
if test -f /tmp/selenium.pid
then
echo "Selenium is already running."
else
export DISPLAY=localhost:99.0
java -Dwebdriver.gecko.driver="/usr/lib/geckodriver/geckodriver" -jar /usr/lib/selenium/selenium-server-standalone.jar -port 4444 > /var/log/selenium/output.log 2> /var/log/selenium/error.log & echo $! > /tmp/selenium.pid
@d4rkm3z
d4rkm3z / virtualbox-clone-fixed-to-dynamic.md
Created June 22, 2017 17:39 — forked from stormwild/virtualbox-clone-fixed-to-dynamic.md
VirtualBox clone fixed size vm to dynamic, resize dynamic vm, expand partition

http://brainwreckedtech.wordpress.com/2012/01/08/howto-convert-vdis-between-fixed-sized-and-dynamic-in-virtualbox/ http://www.webdesignblog.asia/software/linux-software/resize-virtualbox-disk-image-manipulate-vdi/#comment-474

While there is no way to actually switch a VDI between fixed-size and dynamic, you can clone the existing VDI into a new one with different settings with VBoxManage.

VBoxManage clonehd [old-VDI] [new-VDI] --variant Standard
VBoxManage clonehd [old-VDI] [new-VDI] --variant Fixed

If you want to expand the capacity of a VDI, you can do so with

@d4rkm3z
d4rkm3z / postgres-cheatsheet.md
Created May 31, 2018 10:38 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@d4rkm3z
d4rkm3z / Description.md
Created August 6, 2018 16:49 — forked from juanje/Description.md
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }
@d4rkm3z
d4rkm3z / react-forwardref-simple-example.js
Created April 28, 2020 18:53 — forked from jamesreggio/react-forwardref-simple-example.js
Simple example usage of React.forwardRef()
// EmailInput wraps an HTML `input` and adds some app-specific styling.
const EmailInput = React.forwardRef((props, ref) => (
<input ref={ref} {...props} type="email" className="AppEmailInput" />
));
class App extends Component {
emailRef = React.createRef();
render() {
return (
@d4rkm3z
d4rkm3z / gist:ce9910a7f030faf98a937e9d048e1cf6
Created October 26, 2020 14:56 — forked from AliMD/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@d4rkm3z
d4rkm3z / README.md
Created July 15, 2024 15:21 — forked from trevorlinton/README.md
Signing your commits on Github

OSX Steps:

  1. Install gpg if you dont have it.
brew install gpg
  1. See what email address and name you're using for git
git config --global user.email