Skip to content

Instantly share code, notes, and snippets.

Anton Katunin antulik

Block or report user

Report or block antulik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Created Jun 23, 2012 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
View pedantically_commented_playbook.yml
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@willurd
willurd / web-servers.md
Last active Oct 16, 2019
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@toobulkeh
toobulkeh / deploy.rb
Created Jan 2, 2014 — forked from benedikt/rails.rb
Updated for Capistrano 3.
View deploy.rb
# encoding: UTF-8
# Place in config/deploy.rb
namespace :rails do
desc "Open the rails console on each of the remote servers"
task :console do
on roles(:app) do |host| #does it for each host, bad.
rails_env = fetch(:stage)
execute_interactively "ruby #{current_path}/script/rails console #{rails_env}"
@peterc
peterc / methods_returning.rb
Last active Aug 14, 2017
Object#methods_returning - to work out which method on an object returns what we want
View methods_returning.rb
require 'stringio'
require 'timeout'
class Object
def methods_returning(expected, *args, &blk)
old_stdout = $>
$> = StringIO.new
methods.select do |meth|
Timeout::timeout(1) { dup.public_send(meth, *args, &blk) == expected rescue false } rescue false
View filterable.rb
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with the same name as the keys in <tt>filtering_params</tt>
# with their associated values. Most useful for calling named scopes from
@eabait
eabait / charting.libraries.md
Last active Jul 13, 2017
Charting Libraries
View charting.libraries.md
@sheharyarn
sheharyarn / YoutubeDownloader.md
Last active Sep 16, 2019
Download Videos from Youtube in (Ruby || PHP)
View YoutubeDownloader.md

Youtube Downloaders

Download Youtube Videos using Ruby or PHP

Just copy the appropriate script, provide the video_id and run. It will list download links for different qualities and streams.

:P

You can’t perform that action at this time.