Skip to content

Instantly share code, notes, and snippets.

View polybuildr's full-sized avatar

Vivek Ghaisas polybuildr

View GitHub Profile
@polybuildr
polybuildr / clipboard.sh
Created August 15, 2015 18:43
Command line script to copy to and from terminal command output
#!/bin/bash
# Linux version
# Use this script to pipe in/out of the clipboard
#
# Usage: someapp | clipboard # Pipe someapp's output into clipboard
# clipboard | someapp # Pipe clipboard's content into someapp
#
if command -v xclip 1>/dev/null; then
if [[ -p /dev/stdin ]] ; then
@polybuildr
polybuildr / audio.js
Last active August 29, 2015 14:23
Create music using baudio and some custom code
var baudio = require('baudio')
, TAU = Math.PI * 2
var ADSR = function(a, d, s, r) {
this.attackDuration = a
this.decayDuration = d
this.sustainLevel = s
this.releaseDuration = r
var attackTime = false
<?php
$foo = "bar";
echo $foo;
@polybuildr
polybuildr / test-highlight.php
Last active February 22, 2020 19:39
Testing GitHub Gists syntax highlighting for PHP without an opening <?php tag.
$foo = "bar";
echo $foo;
@polybuildr
polybuildr / randomstring.sh
Created October 17, 2014 19:03
Like, what? :P (P. S. Thanks to Coca Cola)
echo import random\;s=\"$(echo $(curl -s $(echo http://www.a`echo "import random; print ''.join(random.randint(2,60) * ['h'])" | python`.com) | base64) | tr -d " ")\"\; n = len\(s\)\;x=random.randint\(10, n-30\)\;print s[x:x+20] | python
@polybuildr
polybuildr / node-dark-sol-fix.sh
Created September 23, 2014 20:32
Fix the 'invisible text' error while using node modules and dark solarized terminal theme
find . -type f -print0 | xargs -0 sed -i 's/colors.grey/colors.white/g'
find . -type f -print0 | xargs -0 sed -i 's/chalk.gray/chalk.white/g'

#Document Title

##Heading 2

###Introduction

Something, something. A link to Google.

  • Bullets
  • Another one