Skip to content

Instantly share code, notes, and snippets.

View Prajjwal's full-sized avatar

Prajjwal Singh Prajjwal

View GitHub Profile
@Prajjwal
Prajjwal / monad.rb
Created April 23, 2015 15:40
An attempt at monads in ruby
class Array
def m_return(value)
[value]
end
def m_bind(f)
self.map(&f).flatten
end
end
@Prajjwal
Prajjwal / filters.txt
Created January 31, 2016 15:48
List of imagemagick filters
point
hermite
cubic
box
gaussian
catrom
triangle
quadratic
mitchell
lanczos
require_relative 'library'
# This is the library:
#
# class Lord
# def self.printar(x)
# puts x.reverse
# end
# end
@Prajjwal
Prajjwal / rails_model_structure.rb
Created June 6, 2016 20:31
Rails Model Structure
class User < ApplicationRecord
# === [Constants] ==========
# === [Attributes] =========
# === [Extensions] =========
# === [Relationships] ======
# === [Validations] ========

Keybase proof

I hereby claim:

  • I am prajjwal on github.
  • I am prajjwal (https://keybase.io/prajjwal) on keybase.
  • I have a public key ASBwa5EJxpOlzJ2oXEuFK8AKHCY9rFwdhgidrVknCqDOaAo

To claim this, I am signing this object:

@Prajjwal
Prajjwal / index.html
Last active December 12, 2016 21:25
Canvas Minesweeper I wrote back in 2012.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas Minesweeper</title>
<style type="text/css">
#container { width: 1250px; margin: 0 auto }
</style>
</head>
<body>
@Prajjwal
Prajjwal / transfer.sh
Last active March 20, 2020 20:07 — forked from nl5887/transfer.fish
Pure zsh client for transfersh, supports optional archiving and yanking to clipboard.
#!/bin/zsh
# Defines transfer alias and provides easy command line file.
#
# Authors:
# Remco Verhoef <[email protected]>
# Prajjwal Singh <[email protected]>
#
# Dependencies:
# * curl
@Prajjwal
Prajjwal / ephemeral-file-sharing-services.md
Last active December 12, 2024 10:21
A List of Ephemeral File Sharing Services

A List of Ephemeral File Sharing Services

Contributions welcome.

~ Prajjwal Singh

Service CLI? Max Size Direct Access Files Expire? Can Limit Download Count? Password Protection HTTPS
c-v.sh curl -F 4 GB Yes Yes, by Mister Alg. No No Enforced
FileIO Yes 5 GB Yes Optionally Fixed @ 1 No Yes
@Prajjwal
Prajjwal / filters.txt
Last active May 9, 2019 19:54
Custom uBlock Origin Static Filters
maps.googleapis.com/*
jivosite.com/*
connect.facebook.net/*
syndication.twitter.com/*
small.chat/*
pubnub.com/time/*
pubnub.com/v2/*
disqus*
@Prajjwal
Prajjwal / ES7ObjectAssignment.js
Last active June 30, 2017 11:13
Helper to mimic the ES7 spread operation on Objects
// Or any object that yields a set of { key: value } pairs.
const x = {
* [Symbol.iterator] () {
yield { done: false, value: { dog: 'cat' } }
yield { done: false, value: { dawg: 'cayt' } }
}
}
function ES7ObjectAssign (target, source) {
for (const sourceObject of source) {