Skip to content

Instantly share code, notes, and snippets.

View ithoq's full-sized avatar

Ithoq Projosasmito ithoq

  • KENDIL.COM
  • Yogyakarta, Indonesia
View GitHub Profile
@salrashid123
salrashid123 / gist:de891486b5b595f561cbcdcdcb2c7b4a
Created April 4, 2017 04:50
List users with Google Directory API
#!/usr/bin/python
from apiclient.discovery import build
import httplib2
from oauth2client.service_account import ServiceAccountCredentials
from oauth2client.client import GoogleCredentials
import logging
import json
import sys
@joseluisq
joseluisq / 1README.md
Created April 19, 2017 07:33
How add a custom field to Laravel 5.4 default login. LoginController.php

How add a custom field to Laravel 5.4 default login controller.

In this php example (app/Http/Controllers/Auth/LoginController.php) my model is called Client and the custom field for login validation is status. (Client->status)

Add in your resources/lang/en/auth.php file :

    'failed_status' => 'Your account is inactive yet. Please confirm your e-mail address.',
@mcortes19
mcortes19 / RADIUS.md
Last active November 27, 2025 15:15
Set up RADIUS server with local, mysql and LDAP configuration

RADIUS SERVER

ROUTER/AP SETTINGS

  • SSID = redes
  • IP = 192.168.1.1/24
  • SECURITY MODE = WPA2 Enterprise
  • RADIUS SERVER = 192.168.1.254
@CodeMyUI
CodeMyUI / index.html
Created May 18, 2017 23:46
Windows Fluent Design Calendar
<main class="calendar-contain">
<section class="title-bar">
<button class="title-bar__burger">
<span class="burger__lines">Toggle Menu</span>
</button>
<span class="title-bar__year">
Calendar > May 2017
</span>
<span class="title-bar__month">
@gangsta
gangsta / SSL.md
Last active March 9, 2025 17:07
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

These are the steps I went through to set up an SSL cert. Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@dennisnissle
dennisnissle / functions.php
Created November 27, 2017 14:52
Disable instant order confirmation in Germanized
<?php
add_filter( 'woocommerce_gzd_instant_order_confirmation', 'my_child_disable_instant_order_confirmation', 1, 10 );
function my_child_disable_instant_order_confirmation( $disable ) {
return false;
}
?>
@holmberd
holmberd / php-pools.md
Last active November 13, 2025 10:56
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@rhukster
rhukster / sphp.sh
Last active March 30, 2024 10:41
Easy Brew PHP version switching (Now moved to https://github.com/rhukster/sphp.sh)
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
#
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh
# >>> Kept here for legacy purposes
#
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
@jameslkingsley
jameslkingsley / File.md
Created May 31, 2018 14:42
REST API Design

Authorization

Authorizing via the "authorization" header in the request is perfect. All request definitions below do not explicitly include that header, however it should be used.

Artist

Retrieve all artists (paginated)

Definition
curl -X GET /api/artist/?page=1
@Neo23x0
Neo23x0 / fp-hashes.py
Last active April 29, 2025 15:53
Typical False Positive Hashes
# This GIST has been transformed into a Git repository and does not receive updates anymore
#
# Please visit the github repo to get a current list
# https://github.com/Neo23x0/ti-falsepositives/
# Hashes that are often included in IOC lists but are false positives
HASH_WHITELIST = [
# Empty file
'd41d8cd98f00b204e9800998ecf8427e',
'da39a3ee5e6b4b0d3255bfef95601890afd80709',