Skip to content

Instantly share code, notes, and snippets.

@bodharma
bodharma / curl.md
Created November 4, 2020 09:57 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@bodharma
bodharma / Dockerfile
Created August 19, 2020 10:54
python 3.7 test env
FROM ubuntu:18.04
COPY . requests_tests
WORKDIR requests_tests
RUN apt-get update
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt update
RUN apt install git -y
RUN apt install python3.7 -y
RUN python3.7 --version
@bodharma
bodharma / shell_bash_exam.md
Last active April 21, 2020 18:23
These tasks are for shell short course exam

Task 1

Your task is to use for loops to display only odd natural numbers from 1 to 99

Input Format

There is no input.

Constraints

from locust import HttpLocust, TaskSet, task
import logging, sys
from credentials import *
class LoginWithUniqueUsersSteps(TaskSet):
email = "NOT_FOUND"
password = "NOT_FOUND"
def on_start(self):
if len(USER_CREDENTIALS) > 0:

Keybase proof

I hereby claim:

  • I am velocyno on github.
  • I am blesi (https://keybase.io/blesi) on keybase.
  • I have a public key ASCUrrhEFiNvG8y_DTaveBzUc1dP9s0bZl9QOn7AC7N-1wo

To claim this, I am signing this object:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "*********************************************"
echo " "
echo "Install https://www.iterm2.com/downloads.html"
echo "Install https://github.com/nicolashery/mac-dev-setup"
echo "Install https://github.com/robbyrussell/oh-my-zsh"
@bodharma
bodharma / caching-ruby
Created January 25, 2018 09:56
caching-ruby
app/controllers/application_controller.rb
# For pages cached by cloudfront must be used
def cache_headers
response.last_modified = Time.now
response.cache_control.merge!(max_age: 8, public: true, must_revalidate: false)
response.weak_etag = response.body
end
# enable caching on event page
app/controllers/events_controller.rb
@bodharma
bodharma / atom
Last active August 12, 2016 08:33
super-automatic update by http://atom.io/packages/sync-settings
blablaaaa