Skip to content

Instantly share code, notes, and snippets.

@abdilahrf
abdilahrf / hosts
Last active October 5, 2023 05:19
Blokir hostname INDIHOM* ke localhost kita biar kapok, untuk linux tambahin di file /etc/hosts & windows /System32/drivers/etc/hosts
# INDIHOM*
127.0.0.1 x-tags.net
127.0.0.1 a01.uadexchange.com
127.0.0.1 cdn.uzone.id
127.0.0.1 cdn3.uzone.id
127.0.0.1 cfs.uzone.id
127.0.0.1 csf.uzone.id
127.0.0.1 d01.notifa.info
127.0.0.1 d31qbv1cthcecs.cloudfront.net
127.0.0.1 d5nxst8fruw4z.cloudfront.net
@lindowx
lindowx / certbot_on_centos-rhel-5.sh
Last active December 20, 2022 16:15
Setup CertBot on CentOS/RHEL 5
#!/bin/sh
#Create working directory
CERTBOT_DIR=/opt/modules/src/certbot
mkdir $CERTBOT_DIR/src -p
cd $CERTBOT_DIR/src
#install openssl to working dir.
wget --no-check-certificate https://www.openssl.org/source/openssl-1.0.1t.tar.gz
tar xvzf openssl-1.0.1t.tar.gz && cd openssl-1.0.1t
@ereli
ereli / countries.sql
Last active March 28, 2024 06:40 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes. PostgreSQL compatible
CREATE SEQUENCE country_seq;
CREATE TABLE IF NOT EXISTS country (
id int NOT NULL DEFAULT NEXTVAL ('country_seq'),
iso char(2) NOT NULL,
name varchar(80) NOT NULL,
nicename varchar(80) NOT NULL,
iso3 char(3) DEFAULT NULL,
numcode smallint DEFAULT NULL,
phonecode int NOT NULL,
@ubante
ubante / gitflow-breakdown.md
Last active March 24, 2024 13:26 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@ifduyue
ifduyue / beanstalkd.service
Last active March 1, 2023 11:36
Install beanstalkd on CentOS 7 / CentOS 8
[Unit]
Description=Beanstalkd is a simple, fast work queue
[Service]
User=nobody
Restart=always
RestartSec=500ms
ExecStart=/usr/local/bin/beanstalkd -b /var/lib/beanstalkd
LimitNOFILE=10240
@paulirish
paulirish / what-forces-layout.md
Last active April 19, 2024 06:03
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@blairg23
blairg23 / gist:dc421453b035321a5e27
Last active January 21, 2022 14:01
Oauth Example Authentication with Flickr using requests_oauthlib in Python
import requests_oauthlib
api_key = <api_key_here>
api_secret = <api_secret_here>
# OAuth URLs
request_token_url = 'https://www.flickr.com/services/oauth/request_token'
access_token_url = 'https://www.flickr.com/services/oauth/access_token'
authorization_url = 'https://www.flickr.com/services/oauth/authorize'
@mkolb
mkolb / var_dump-log.php
Last active January 3, 2023 14:53
var_dump into error log
<?php
ob_start();
var_dump($this);
error_log(ob_get_clean());
?>