Skip to content

Instantly share code, notes, and snippets.

View jonnydubowsky's full-sized avatar

Jonny Dubowsky jonnydubowsky

View GitHub Profile
@foysavas
foysavas / helpers.rb
Created January 31, 2011 18:12
Carrierwave, DataMapper, & Sinatra starring in "Imagine the Possibilities"
def is_ajax_request?
if respond_to? :content_type
if request.xhr?
true
else
false
end
else
false
end
@jarvist
jarvist / angles_by_structure.py
Last active September 9, 2018 00:56
Calculates vertices of C60 buckyball from the Cartesian coordinates suggested on Wikipedia page, and a bit of permutation magic on the 'generator' thus describe. I'm sure there's a more elegant way to do the +- permutation too.
#See http://en.wikipedia.org/wiki/Truncated_icosahedron
phi = (1+5**0.5)/2 #golden mean
generator= [ [0,1,+3*phi],
[2,1+2*phi,phi],
[1,2+phi,2*phi]]
#From http://blog.adambachman.org/2008/10/simple-permutations-in-python-and-ruby.html
@Yomguithereal
Yomguithereal / .gitignore
Last active March 25, 2024 22:52
Hacker News scraper artoo.js bookmarklet
node_modules
build
*.min.js
@cflint12
cflint12 / IMDB_Data_Cleansing.py
Last active October 5, 2018 19:30
Clean the output from IMDB_Initial_WebScraping.py (Movie_DF_11_20_2014.csv is the input file for this program)
import os
import pandas as pd
#os.chdir('Change your directory here ...')
'''
Take the output from IMDB_Initial_WebScraping.py and use Excel to separate out the
languages, countries, writers, genres, directors, actors, and genres into separate
cells by using the "Text to Columns" feature with commas as the delimiter, making sure
@renestalder
renestalder / README.md
Last active May 29, 2024 17:43
Unfollow all on Facebook

Facebook: Unfollow people and pages

See comments section for more up-to-date versions of the script. The original script is from 2014 and will not work as is.

  1. Open news feed preferences on your Facebook menu (browser)
  2. Click people or pages
  3. Scroll down (or click see more) until your full list is loaded
  4. Run the script in your browser console

Facebook will block this feature for you while you use it, depending on how much entities you try to unfollow. It automatically unblocks in a couple of hours and you will be able to continue.

@jpf
jpf / thoughts-on-literate-programming.md
Last active June 7, 2021 03:50
Thoughts after 6 months of literate programming

Thoughts after 6 months of literate programming

I wrote my first literate program in November of 2015. Since then, I've been writing literate programs on an almost daily basis. It has been an experience with a sort of enlightenment that I haven't had in a long time. Not only is it a lot of fun to write literate programs, I feel like I have gained a new "super power" of sorts.

Below are my thoughts on my experiences with literate programming so far.

@jo-tud
jo-tud / EthOn_block_example.turtle.rdf
Created December 22, 2016 10:50
Describing a block with EthOn
ethereum:Block0
a ethon:Block ;
rdfs:label "Genesis Block" ;
rdfs:comment "This is the block with block number 0. It is the Genesis Block of the Ethereum blockchain." ;
ethon:number 0 ;
ethon:blockBeneficary ethereum:Account0 ;
ethon:blockReward 5000000000000000000 ;
ethon:gasLimit 5000 ;
ethon:blockNonce "0000000000000042"^^xsd:hexBinary ;
[...]
@Zorlin
Zorlin / bu-seedbox-node.MD
Last active August 19, 2018 00:08
Running Bitcoin Unlimited full nodes on inexpensive machines (eg: seedboxes and VPS)

Last updated 1:05am 2017-03-24 GMT

Changes:

  • Update to latest BU version
  • Improve upgrade guide

Introduction

Running a full node can help the Bitcoin network significantly.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bretton
bretton / lightning-maps.md
Last active June 4, 2024 12:36
Visualisers of the Lightning Network (and some other explorers)

A (mostly) visual collection of the Lightning Network

Disclaimer

Network views tend to be the view of the network from a single node, or small selection of nodes. They are not complete views of the network. This is impossible to achieve. Even if many node views were combined, it would still be incomplete.

These network views, or network maps, have been termed 'visualisers' by the LN community.

Screenshots may reflect older visual styles, and are dated accordingly.