Skip to content

Instantly share code, notes, and snippets.

@sheki
sheki / sudoku.go
Created January 28, 2019 02:38
Norvig_sudoku
package main
import (
"fmt"
"log"
"sort"
"strings"
)
func cross(a []string, b []string) []string {
Hey
Just checking in about this ?
On 1/7/19 2:36 PM, Abhishek Kona wrote:
>
> I just reset greenkeeper
@sheki
sheki / recurse_http_store.go
Created November 3, 2018 23:35
Solution for a recurse center problem
package main
import (
"errors"
"fmt"
"log"
"net/http"
"sync"
)
declare module "react-loadable" {
declare type LoadingProps = {
isLoading: boolean,
pastDelay: boolean,
timedOut: boolean,
retry: () => void,
error: ?Error,
};
declare type CommonOptions = {
/*
histogram [1,1,1,5] ==
*
*
* *
==========
0123456789
histogram [1,4,5,4,6,6,3,4,2,4,9] ==
*
@sheki
sheki / active_record_block.rb
Last active April 5, 2018 19:57
approximate.rb
class SuperActiveRecord < ActiveRecord
instance_methods.each |name| do .# not exact syntaxa
### IF THIS IS NOT POSSBILE override 10 most use actie record methods like
### new/find/where/find_by/update so on and so forth
original_method = instance_method(name)
define_method(name) do |*args|
check_if_allowed()
original_method.bind(self).call(*args)[[[[
@sheki
sheki / woot woot
Created March 29, 2018 22:07
sheki_zig.txt
ABCDEFGHIJ, 3
A E I
BDFHJ
C G
ABCDEFGHIJKLMNOPQ, 4
A G M
B FH LN
@sheki
sheki / 94114.json
Created March 7, 2018 21:41
geojson_responses.json
{
"results" : [
{
"address_components" : [
{
"long_name" : "94114",
"short_name" : "94114",
"types" : [ "postal_code" ]
},
{
@sheki
sheki / zigzag.c
Created February 7, 2018 19:14
Print ZigZag
/*
ABCDEFGHIJ, 3
A E I
BDFHJ
C G
ABCDEFGHIJKLMN, 4
A G M
@sheki
sheki / srikthebossgodman.clj
Created August 10, 2017 21:13
rickandmorty
(defn square
"square of a number"
[a]
(* a a))
(defn square_sum
"sum of square of 2 numbers"
[a b]
(+ (square a) (square b)))