Skip to content

Instantly share code, notes, and snippets.

Avatar

Prajjwal Singh Prajjwal

View GitHub Profile
@Prajjwal
Prajjwal / ES7ObjectAssignment.js
Last active Jun 30, 2017
Helper to mimic the ES7 spread operation on Objects
View ES7ObjectAssignment.js
// 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) {
@Prajjwal
Prajjwal / filters.txt
Last active May 9, 2019
Custom uBlock Origin Static Filters
View filters.txt
maps.googleapis.com/*
jivosite.com/*
connect.facebook.net/*
syndication.twitter.com/*
small.chat/*
pubnub.com/time/*
pubnub.com/v2/*
disqus*
@Prajjwal
Prajjwal / ephemeral-file-sharing-services.md
Last active Aug 3, 2021
A List of Ephemeral File Sharing Services
View ephemeral-file-sharing-services.md

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 / transfer.sh
Last active Mar 20, 2020 — forked from nl5887/transfer.fish
Pure zsh client for transfersh, supports optional archiving and yanking to clipboard.
View transfer.sh
#!/bin/zsh
# Defines transfer alias and provides easy command line file.
#
# Authors:
# Remco Verhoef <remco@dutchcoders.io>
# Prajjwal Singh <sin@prajjwal.com>
#
# Dependencies:
# * curl
@Prajjwal
Prajjwal / index.html
Last active Dec 12, 2016
Canvas Minesweeper I wrote back in 2012.
View index.html
<!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>
View keybase.md

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:

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