Skip to content

Instantly share code, notes, and snippets.

View fordnox's full-sized avatar
🍕
Eating pizza

Andrius Putna fordnox

🍕
Eating pizza
View GitHub Profile
@pyrou
pyrou / docker-compose.yml
Last active May 2, 2024 11:09
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@chris124567
chris124567 / WHOIS server by TLD List
Last active June 10, 2021 14:26
I used this python script to download whois information for all TLDs from IANA whois server, then used text manipulation and grep to get the data into the format below
MITSUBISHI:whois.nic.gmo
XN--3BST00M:whois.gtld.knet.cn
PW:whois.nic.pw
MUSEUM:whois.nic.museum
AMERICANFAMILY:whois.nic.americanfamily
RMIT:whois.nic.rmit
MOTORCYCLES:whois.afilias-srs.net
PROPERTIES:whois.nic.properties
STUDY:whois.nic.study
LY:whois.nic.ly
@cameroncowden
cameroncowden / page.google-product-feed.liquid
Created August 15, 2018 15:34
Shopify Google Product Feed xml generator
{% comment %}
Instructions:
- Create a blank page called 'Google Base Product Feed'and save it
- Open that page for editing and select 'page.google-feed' from the page template selector
- Add a brief site description to the meta-shop-description snippet
- The feed url should now be available at http://www.yoursite.com/pages/google-base-product-feed
- validate your field at http://validator.w3.org/feed/
- when ready, submit your feed at http://base.google.com
@ChristopherJohnson25
ChristopherJohnson25 / .travis.yml
Last active November 1, 2020 21:59
Ember/Travis Deployment Pipeline
---
language: node_js
node_js:
- "6"
sudo: false
dist: trusty
addons:
chrome: stable
@nelruk
nelruk / bitcoin-halving.cpp
Created November 14, 2017 22:44
Bitcoin halving (line 1093)
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
// Force block reward to zero when right shift is undefined.
if (halvings >= 64)
return 0;
CAmount nSubsidy = 50 * COIN;
// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
nSubsidy >>= halvings;
@yusinto
yusinto / updateCountry_fetch.js
Last active May 4, 2024 02:04
Graphql mutation with fetch
const updateCountryFetch = async (countryId, happinessFactor, population) => {
const query = JSON.stringify({
query: `mutation {
updateCountry(
id: "${countryId}"
happinessFactor: ${happinessFactor}
population: ${population}) { id }
}
`
});
@canhnt
canhnt / git-delete-local-tag.sh
Created August 9, 2017 09:11
Delete local tags that do not exist in remote
git fetch --prune origin "+refs/tags/*:refs/tags/*"