Skip to content

Instantly share code, notes, and snippets.

@richardjortega
richardjortega / curl_rest_api.md
Last active March 2, 2021 14:14
cURL REST API for Azure Resource Manager (ARM)

Using cURL and Azure REST API to access Azure Resource Manager (non-interactive)

Note: This guide assumes Azure CLI 2.0 is installed and familiarity with Azure concepts.

Register Client App and Obtain Service Principal (via CLI)

The APP_ID_URI needs to match what is expected in client request calls.

$ az ad sp create-for-rbac --name [APP_ID_URI] --password [PASSWORD]
@glueckpress
glueckpress / hallo-welt.md
Last active February 10, 2016 10:58
Hallo Welt!

Hallo Welt!

Read in English

Sergej Müller hat seinen Abschied von WordPress angekündigt. Damit seine hochgeschätzten freien Plugins nicht verschwinden, haben wir zu diesem Zweck ein Team gebildet. Wichtig ist uns, die Datenschutz-Konformität der Plugins zu erhalten und eine kommerzielle Nutzung der Domains zu verhindern.

Mit mehreren Personen aus der deutschsprachigen Community führen wir die 11 freien Plugins weiter. Dies sind im Einzelnen:

@mikhailov
mikhailov / gist:9639593
Last active November 10, 2023 22:04
Nginx S3 Proxy with caching
events {
worker_connections 1024;
}
http {
default_type text/html;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
@diyan
diyan / python_stack.md
Last active September 3, 2020 10:32
Tools and libraries which I prefer to use in Python stack

Tools and libraries which I prefer to use in Python stack

Development Environment

  • Ubuntu Linux for both development and production
  • Git version control system
  • Jenkins CI build server (but recently I'm moving to git server-side hooks with ssh from git server to dev/stage/prod servers)
  • Redmine bug tracking system
  • JetBrains PyCharm IDE

Production Environment

@Stanback
Stanback / nginx.conf
Last active February 4, 2022 18:05
Example Nginx configuration for serving pre-rendered HTML from Javascript pages/apps using the Prerender Service (https://github.com/collectiveip/prerender).Instead of using try_files (which can cause unnecessary overhead on busy servers), you could check $uri for specific file extensions and set $prerender appropriately.
# Note (November 2016):
# This config is rather outdated and left here for historical reasons, please refer to prerender.io for the latest setup information
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol
server {
listen 80;
listen [::]:80;
server_name yourserver.com;
root /path/to/your/htdocs;
@cheekybastard
cheekybastard / scrapy_plus_selenium_renderedpage
Created February 13, 2013 14:17
Using Scrapy with Selenium to scape a rendered page
#Using Scrapy with Selenium to scape a rendered page [Updated]
from scrapy.contrib.spiders.init import InitSpider
from scrapy.http import Request, FormRequest
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from selenium import selenium
@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@sfelde
sfelde / mysql_dump
Created May 9, 2012 08:22
mysqldump with gzip
#!/bin/bash
#MAILTO=mail@domain.ltd
USER='uname'
PWD='password'
DBNAME='dbname'
DATE=`date +%y%m%d.%H%M`
#backup db
mysqldump --default-character-set="UTF8" --extended-insert=FALSE -u$USER -p$PWD $DBNAME | gzip > $DATE.stage.sql.gz