Skip to content

Instantly share code, notes, and snippets.

View kohgpat's full-sized avatar
🤖
...

Nikolay Burlov kohgpat

🤖
...
  • Russia, Siberia
View GitHub Profile
@niquola
niquola / list.md
Last active May 20, 2018 04:52
Must Read from Ravil Bayramgalin (https://github.com/brainopia) + my small adds :)

Books

Concepts-Techniques-Models-Computer-Programming CMT это известная книжка CMT, за которой слава закрепилась не хуже чем у SICP

это из этой книжки классификация различных парадигм Если присмотришься, то увидишь, что Oz поддерживает большинство вариаций (с этой целью его и конструировали, чтобы можно было наглядно продемонстрировать различные подходы в одном языке)

@mislav
mislav / install.sh
Last active December 19, 2015 15:49
Test-drive the new vim 7.4 prerelease
cd /tmp
wget ftp://ftp.vim.org/pub/vim/unstable/unix/vim-7.4a.tar.bz2 -O- | tar -xj
cd vim74a
sudo mkdir -p /opt/vim
sudo chown $USER /opt/vim
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure --prefix=/opt/vim --enable-rubyinterp | grep ruby
make && make install
@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@britishtea
britishtea / dependency.rb
Last active March 30, 2017 19:43
A null object in Ruby with refinements
module Dependency
def self.give_me_the_nil
nil
end
end
@benbalter
benbalter / jekyll-drafts.md
Last active March 12, 2024 07:39
Example of using drafts in Jekyll

Let's say your Jekyll site's directory structure looks like:

|-- _config.yml
|-- _drafts/
|   |-- a-draft-post.md
|-- _layouts/
|   |-- default.html
|-- _posts/
| |-- 2013-05-10-a-published-post
core (master) git log --reverse --since "Feb 1 2013" --until "Mar 1 2013" | grep "Jan"
Date: Wed Jan 30 10:54:05 2013 +1100
Date: Wed Jan 30 11:20:57 2013 +1100
Date: Wed Jan 23 11:11:31 2013 +0200
Date: Wed Jan 23 08:44:45 2013 -0800
Date: Wed Jan 30 11:41:51 2013 +1100
Date: Wed Jan 30 11:49:49 2013 +1100
@sstephenson
sstephenson / super.bash
Last active January 30, 2017 01:40
`super` in Bash
#!/usr/bin/env bash
source super.bash
foo() {
echo hello
}
super_function foo
foo() {
@mislav
mislav / test_helper.rb
Last active May 20, 2020 14:52
Vim highlight lines of Ruby that are not covered with tests. When the test suite runs, SimpleCov will generate a "coverage/raw" file. Next, the Vim function can be used to read data from that file for the current buffer and mark lines not covered with tests.
require 'simplecov'
require 'coveralls'
# writes out a "coverage/raw" file to be read by Vim
class RawMissingLinesFormatter
def format(result)
File.open('coverage/raw', 'w') { |raw|
result.source_files.each do |file|
file.lines.each do |line|
if line.missed?
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb
dissimilarity index 99%
index 414904b..0b0b21d 100644
--- a/app/views/devise/shared/_links.erb
+++ b/app/views/devise/shared/_links.erb
@@ -1,19 +1,15 @@
-<%- if controller_name != 'sessions' %>
- <%= link_to "Sign in", new_session_path(resource_name) %><br />
-<% end -%>
-
@mjamieson
mjamieson / README.md
Last active February 2, 2018 16:39
Instagram photos by location for Dashing

Description

Dashing widget to display location based photos from Instagram.

##Dependencies

instagram - Official Ruby Gem

Add the following to your Dashing Gemfile: