Skip to content

Instantly share code, notes, and snippets.

View mashurex's full-sized avatar

Mustafa Ashurex mashurex

View GitHub Profile
@mashurex
mashurex / AvatarGenerator.kts
Last active May 28, 2021 23:14
SVG avatar generator from sha256 hash values
package com.ashurex
import java.io.FileWriter
import java.math.BigDecimal
import kotlin.math.PI
import kotlin.math.cos
import kotlin.math.floor
import kotlin.math.round
import kotlin.math.sin
import kotlin.math.sqrt
@mashurex
mashurex / config.txt
Last active February 20, 2019 17:47
GBZ Install and Configuration
disable_overscan=1
dtparam=i2c_arm=on
dtparam=spi=on
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
dtoverlay=pwm,pin=18,func=2
@mashurex
mashurex / WebSecurityConfig.java
Created June 11, 2017 02:24
Spring Boot LDAP Authentication and Groups with JumpCloud
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter
{
@Override
protected void configure(HttpSecurity http) throws Exception {
// Put whatever your HTTP security requirements are here.
http
.authorizeRequests()
.anyRequest().fullyAuthenticated()
.and()
; Sample supervisor config file for running a Laravel queue listener.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)

Keybase proof

I hereby claim:

  • I am mashurex on github.
  • I am ashurexm (https://keybase.io/ashurexm) on keybase.
  • I have a public key ASDMgbQzrrx-sv_2nn_SuagJ-h_Nqb4mqnRw8ozeN0flUAo

To claim this, I am signing this object:

# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
@mashurex
mashurex / svn-clean
Last active December 23, 2015 05:08
Recursively delete .svn directories on Linux and OSX
find . -type d -name .svn -exec rm -rf {} \;
@mashurex
mashurex / newrelic_mysql_agent.sh
Last active December 20, 2015 02:19
New Relic MySQL Agent Plugin init.d script
#!/bin/bash
#
# /etc/init.d/newrelic_mysql_agent -- Startup/shutdown script for New Relic MySQL Plugin
#
# Written by Mustafa Ashurex <mustafa@ashurexconsulting.com>.
#
#
### BEGIN INIT INFO
# Provides: newrelic_mysql_plugin
# Required-Start: $Local_fs $remote_fs $network $sysLog
@mashurex
mashurex / blame.sh
Created June 28, 2013 23:29
Subversion blame history output script
#!/bin/bash
#######
#
# SVN Blame Writer
# Author: Mustafa Ashurex
# Description: Automatically outputs svn blame to a history file and/or screen for reading.
#
#######
function print_help {
@mashurex
mashurex / tomcat7.sh
Last active December 18, 2015 12:49
Tomcat 7 init.d script
#!/bin/bash
#
# /etc/init.d/tomcat7 -- Startup/shutdown script for Tomcat 7
#
# Written by Mustafa Ashurex <mustafa@ashurexconsulting.com>.
#
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $Local_fs $remote_fs $network $sysLog