Skip to content

Instantly share code, notes, and snippets.

View Snegovikufa's full-sized avatar
📍
Push the red button

Rustam Safin Snegovikufa

📍
Push the red button
View GitHub Profile
@Snegovikufa
Snegovikufa / a.md
Last active January 13, 2017 04:20
Visual Studio Code as external tool for Visual Studio
  1. Create new external tool via Tools - External Tools...
  2. Add new external tool
Settings Value
Title VS Code
Command D:\Soft\VS Code\Code.exe
Arguments -g $(ItemPath):$(CurLine):$(CurCol)
Initial directory $(ItemDir)
@BretFisher
BretFisher / docker-cli-tips-and-tricks.md
Last active December 6, 2023 19:49
Docker CLI Tips and Tricks
@Snegovikufa
Snegovikufa / gist:3b2b3c191c087c1a36bd
Created March 25, 2015 14:07
PyCharm/Idea Sublime External Tool
Program: D:\Progs\Sublime Text 3\subl.exe
Parameters: $FilePath$:$SelectionEndLine$:$SelectionStartColumn$
@Snegovikufa
Snegovikufa / sublime.txt
Last active October 24, 2017 09:34
Visual Studio Sublime Text external tool
Command: C:\Program Files\Sublime Text 3\sublime_text.exe
Arguments: $(ItemPath):$(CurLine):$(CurCol)
Initial directory: $(ItemDir)
@zabbarob
zabbarob / 7-zip-default-extract.reg
Last active October 18, 2024 03:47
Make 7-Zip extract to folder when double-clicking archives. (based on http://superuser.com/a/447791)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\7-Zip.001\shell]
@="extract"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract]
@="Extract to Folder"
[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract\command]
@="\"C:\\Program Files\\7-Zip\\7zG.exe\" x \"%1\" -o*"
[HKEY_CLASSES_ROOT\7-Zip.7z\shell]
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@agnoster
agnoster / README.md
Last active September 25, 2024 09:27
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 17, 2024 13:10
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@sergey-miryanov
sergey-miryanov / gist:3359203
Created August 15, 2012 11:10
How to use py2exe with mayavi and enable (from ETS)
import os
import sys
from distutils.core import setup
from distutils.dir_util import copy_tree
from py2exe.build_exe import py2exe
import glob
import zlib
import shutil
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs