Skip to content

Instantly share code, notes, and snippets.

Irina Shefer redVi

Block or report user

Report or block redVi

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
@redVi
redVi / resetXcode.sh
Created Apr 8, 2020 — forked from maciekish/resetXcode.sh
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
View resetXcode.sh
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@redVi
redVi / nuke-deps.sh
Created Apr 7, 2020 — forked from jsdario/nuke-deps.sh
Script to clean watchman, remove node_modules, clean cache and restart packager for React Native troubleshooting.
View nuke-deps.sh
#!/bin/bash
# Stop cached listeners
watchman watch-del-all
# Remove installed modules
rm -rf node_modules
# Remove yarn meta files
rm yarn*
@redVi
redVi / npm-update-exact.js
Last active Apr 8, 2020
Automatic update of npm packages with the exact flag
View npm-update-exact.js
// node npm-update-exact.js "/home/user/path_to_project"
const path = require("path")
const fs = require("fs").promises
const { access } = require("fs")
const { exec } = require("child_process")
const filename = "package.json"
const projectPath = process.argv.slice(2).join(" ")
const packageFilePath = `${projectPath}/${filename}`
let packageFile = undefined
@redVi
redVi / index.js
Created Feb 7, 2019 — forked from isRuslan/index.js
JS: find one unique value from duplicate array
View index.js
/*
Given the array of IDs, which contains many duplicate integers
and one unique integer, find the unique integer.
*/
// O(n^2): loop in loop
function find_unique_brute (array) {
var result = null, n = array.length;
@redVi
redVi / gist:04ace75b96f7408e220fe6bb971a85cc
Created Sep 29, 2017 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
View gist:04ace75b96f7408e220fe6bb971a85cc
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@redVi
redVi / verbs.tex
Last active Aug 29, 2015
English verbs. Mind map.
View verbs.tex
\documentclass[a4paper]{article}
\usepackage[russian]{babel}
\usepackage[utf8]{inputenc} % UTF-8
\usepackage{tikz} % include TikZ
\usetikzlibrary{mindmap, trees, shadows} % TikZ library
\usepackage{verbatim}
\usepackage[left=2cm,right=2cm,
top=2cm,bottom=2cm,bindingoffset=0cm]{geometry}
\usepackage{color} % you may define RGB colors
@redVi
redVi / i18n_filter.rb
Last active Dec 24, 2019
Jekyll localization. Author unknown.
View i18n_filter.rb
require 'i18n'
LOCALE = 'ru'
module Jekyll
module I18nFilter
def localize(input, format=nil)
load_translations
format = (format =~ /^:(\w+)/) ? $1.to_sym : format
I18n.l input, :format => format, :locale => LOCALE
@redVi
redVi / sitemap.xml
Created Feb 19, 2014
sitemap of jekyll blog
View sitemap.xml
---
layout: none
sitemap:
priority: 1.0
changefreq: weekly
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in site.posts %}
<url>
@redVi
redVi / ru.yml
Created Nov 13, 2013
localization file for Jekyll (_locales/ru.yml)
View ru.yml
ru:
date:
abbr_day_names:
- Вс
- Пн
- Вт
- Ср
- Чт
- Пт
- Сб
You can’t perform that action at this time.