Skip to content

Instantly share code, notes, and snippets.

View antydemant's full-sized avatar
🇺🇦
🇺🇦

Ihor Ostapchuk antydemant

🇺🇦
🇺🇦
  • DataRobot
  • Khmelnytskyi, Ukraine
View GitHub Profile
@hungneox
hungneox / WIN10.MD
Last active June 5, 2024 19:13
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

@xd547
xd547 / delete_time_machine_localsnapshot.sh
Last active November 27, 2018 11:22
Delete all localsnapshots expect last one.
#!/bin/sh
echo 'Delete all local snapshots expect last one.'
for date in $(tmutil listlocalsnapshots / | cut -d. -f4 | sed '$d')
do
tmutil deletelocalsnapshots $date
done
echo 'Thinlocalsnapshots'
tmutil thinlocalsnapshots /
@raulpineda
raulpineda / MexicanFood.md
Last active February 11, 2021 10:00
A list of Mexican food worth trying

Regional Specialties:

South East

  • Papatzules - Pumpkin seed sauce and egg based dish
  • Cochinita Pibil - Like pulled pork, but Mexican, and a million times better
  • Pan de Cazón - One of those things you can only get in the Mexican southeast: it's a local shark and black bean based specialty
  • Relleno negro (Chilmole) - Turkey and a black sauce that's waaay to difficult to describe properly.
  • Panuchos - Street food classic. It's a fluffy tortilla filled with refried beans and pork
  • Salbutes - Similar to panuchos, but fresher and normally turkey based
  • Tamales - Corn based dough steamed in a banana leaf with meat and sauce
@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active March 28, 2024 19:52
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

@kramarama
kramarama / xdebug
Created March 21, 2014 19:58
install xdebug on centos
http://xdebug.org/install.php#configure-php
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/
on CentOS:
1. You need to install PHP’s devel package for PHP commands execution
yum install php-devel
yum install php-pear
2. Next install GCC and GCC C++ compilers to compile Xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
@EvanHahn
EvanHahn / gist:2587465
Last active October 9, 2023 01:26
Caesar shift in JavaScript
/*
JavaScript Caesar shift
by Evan Hahn (evanhahn.com)
"Encrypt" like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And "decrypt" like this: