Skip to content

Instantly share code, notes, and snippets.

View sbadulin's full-sized avatar

Sergei Badulin sbadulin

  • Somis Enterprises Oy
  • Espoo, Finland
View GitHub Profile
@riodw
riodw / deploy.php
Last active May 8, 2023 08:54
Deploy to Production Server with git using PHP
<?php
/**
* GIT DEPLOYMENT SCRIPT
*
*/
// The commands
$commands = array(
'echo $PWD',
'whoami',
'git reset --hard HEAD',
@Freika
Freika / givup.md
Last active August 23, 2023 21:57
Ты слишком быстро сдаешься

Деятельность ментора по программированию часто напоминает работу неким life coach'ем. Мотивировать. Давать общие советы по жизни. Как организовывать время. Как решать задачи. Как быть продуктивным. Это всё значительно важней, чем уметь фреймворк X или язык программирования Y. Научись программировать на одном ЯП — и ты найдёшь себе работу "Язык X junior developer". Научись мгновенно изучать любую технологию и разбираться в любом коде и задаче — и ты никогда не останешься без работы и денег.

На днях я искал нового помощника для разработки mkdev.me, выложив в Интернет вот такое описание вакансии: https://gist.github.com/Fodoj/4acb2c9d1f6335de003f028585c3126d

Ключевым пунктом в требованиях там было, пожалуй, следующее: «Трудолюбие, желание учиться, вот это вот всё».

Каждому, кто откликнулся на эту, простите, вакансию я выдал небольшое тестовое задание — починить тесты в open source геме.

Результат меня разочаровал, хоть и был весьма предсказуемым: из десятка людей с «горящими глазами и жадных до знаний» ли

@milmazz
milmazz / imposter-handbook-links.md
Last active January 17, 2025 12:36
Useful links found in The Imposter's Handbook by Rob Conery
@coryhouse
coryhouse / package.json
Last active April 15, 2023 15:08
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@johnantoni
johnantoni / gist:07df65898456ace4307d5bb6cbdc7f51
Last active November 1, 2024 18:33 — forked from mgmilcher/gist:5eaed7714d031a12ed97
Nginx, PHP-FPM, MySQL and phpMyAdmin on OS X

This is my take on how to get up and running with NGINX, PHP-FPM, MySQL and phpMyAdmin on OSX Yosemite.

This article is adapted from the original by Jonas Friedmann. Who I just discovered is from Würzburg in Germany. A stonesthrow from where I was born ;)

Xcode

Make sure you have the latest version of XCode installed. Available from the Mac App Store.

Install the Xcode Command Line Tools:

xcode-select --install

@alexbaumgertner
alexbaumgertner / js-courses.md
Last active July 18, 2024 08:31
JavaScript courses as on March 2016
@christiangenco
christiangenco / download_egghead_videos.md
Last active January 29, 2024 03:16 — forked from ldong/download_egghead_videos.md
download egghead videos
@paulirish
paulirish / what-forces-layout.md
Last active May 21, 2025 13:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@msrose
msrose / combining-git-repositories.md
Last active May 20, 2025 14:44
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.