-
install socat
-
add git-proxy to your path (e.g.
cp git-proxy ~/bin/
) -
make git-proxy executable (e.g.
chmod u+x git-proxy
) -
add ssh config ssh_config entries to your ssh config (samples for github)
-
edit the proxy address in git-proxy
-
edit the proxy address in ssh_config
-
add git configuration
needed for ssh urls that require a login ([email protected]:someone/something.git)
Put this file in your rails project at lib/tasks/db.rake. Use it like
$ rake db:data:validate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# try pairs of 2 | |
def pairs_of_2(names) | |
slices = names.join.scan(/.{2}/) | |
combinations(slices) | |
end | |
# try each chars | |
def pairs_of_chars(names) | |
chars = names.join.chars.to_a.uniq | |
combinations(combinations(chars)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
ruby solver | |
=end | |
$count = 0 | |
def valid?(state, x, y) | |
# check in col and row | |
0.upto(8) do |i| | |
return false if i != y and state[x][i] == state[x][y] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
namespace ConsoleApplication1 | |
{ | |
public class Program | |
{ | |
[DllImport("user32.dll")] | |
static extern IntPtr GetOpenClipboardWindow(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input.png | |
/Gemfile.lock |
NewerOlder