Grab the main page with all the links:
curl https://slackmojis.com/ > emoji
Open file in vim and run the following commands:
v/src=/d
%s/^.*https:/https:/g"
%s/?.*$//g
import inspect | |
import pytest | |
def pytest_addhooks(pluginmanager): | |
print(inspect.currentframe().f_code.co_name) | |
def pytest_namespace(): |
var maximumTries= 200, runCount=0; | |
var timer= setInterval(e=>{ | |
if(maximumTries==maximumTries){ | |
clearInterval(timer) | |
}else{ | |
runCount++ | |
}; | |
document.querySelectorAll('.search-result__actions--primary.button-secondary-medium.m5').forEach(btn=> { | |
if(btn.innerHTML.indexOf('Connect')==-1){ |
#!/usr/local/bin/python3 | |
import logging, select, subprocess | |
LOG_FILE = "test.log" | |
logger = logging.getLogger(__name__) | |
logging.basicConfig(level=logging.INFO,filename=LOG_FILE,format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
def logging_call(popenargs, **kwargs): | |
process = subprocess.Popen(popenargs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
Grab the main page with all the links:
curl https://slackmojis.com/ > emoji
Open file in vim and run the following commands:
v/src=/d
%s/^.*https:/https:/g"
%s/?.*$//g
--- | |
- hosts: localhost | |
connection: local | |
vars: | |
#engine_prefix: / | |
engine_url: "http://example.com:8080/ovirt-engine/api" | |
engine_user: admin@internal | |
engine_password: PASSWORD | |
engine_insecure: true | |
#engine_cafile: /etc/pki/ovirt-engine/ca.pem |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
# Send POST request with data to github api to create a gist | |
curl --user "<username>" --request POST --data '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# or in short | |
curl -u "<username>" -X POST -d '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# or more short, if supplied -d (data) POST method can ommited as below | |
curl -u "<username>" -d '{"description": "Test create a github gists via api", "public": "true", "files": {"test.txt": {"content": "Hello"}}}' https://api.github.com/gists | |
# Send POST request with multiple data | |
curl --data "login=<username>" --data "token=<token_string>" https://github.com/api/v2/json/user/show/<username> | |
# or combine into single --data |
#!/usr/bin/env python3 | |
# vim: ft=python ts=4 sw=4 expandtab | |
# | |
# Copyright (c) 2013 Reed Kraft-Murphy <reed@reedmurphy.net> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |