Skip to content

Instantly share code, notes, and snippets.

View Griefed's full-sized avatar
:shipit:
Playing with Kotlin, Docker, VueJS/Quasar 🧶

Griefed Griefed

:shipit:
Playing with Kotlin, Docker, VueJS/Quasar 🧶
View GitHub Profile
@lsauer
lsauer / gist:2757250
Last active October 10, 2022 03:06
JavaScript : within a string, count the number of occurances of a character / character counting and string-position
//www.lsauer.com 2012
//Answer to:
//http://stackoverflow.com/questions/881085/count-the-number-of-occurances-of-a-character-in-a-string-in-javascript/10671743#10671743
//There are at least four ways. The best option, which should also be the fastest -owing to the native RegEx engine -, is placed at the top. //jsperf.com is currently down, otherwise I would provide you with performance statistics.
#1.
("this is foo bar".match(/o/g)||[]).length
//>2
#2.
"this is foo bar".split("o").length-1
@janikvonrotz
janikvonrotz / Backup-ActiveDirectory.ps1
Created April 15, 2014 12:48
PowerShell: Backup Active Directory#PowerShell#ActiveDirectory
<#
$Metadata = @{
Title = "Backup ActiveDirecotry"
Filename = "Backup-ActiveDirectory.ps1"
Description = ""
Tags = "backup, active, directory, ntsutil"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2014-04-15"
@janikvonrotz
janikvonrotz / Backup-ADGroupPolicies.ps1
Created April 22, 2014 06:51
PowerShell: Backup Active Directory Group Policies#PowerShell#ActiveDirecoty
<#
$Metadata = @{
Title = "Backup Active Directory Group Policies"
Filename = "Backup-ADGroupPolicies.ps1"
Description = ""
Tags = "backup, active, directory, group, object, policy"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2014-04-22"
@2called-chaos
2called-chaos / gist:4eacb303b9491d1e374c
Last active April 6, 2024 23:58
My nginx config for dynmap (on port 8123, that's the dynmap bound to localhost so no direct call possible)
server {
listen 80;
server_name map.geekya.com;
# I normally wouldn't disable the access log but here I see no problem with it
access_log off;
error_log /var/log/nginx/com.geekya.map.error.log;
# custom error page when map isn't available
error_page 502 503 504 =503 /503_map.html;
import java.io.UnsupportedEncodingException;
import java.util.Enumeration;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
/**
* UTF-8 friendly ResourceBundle support
*
* Utility that allows having multi-byte characters inside java .property files.
* It removes the need for Sun's native2ascii application, you can simply have
@drobune
drobune / gist:e03d64ef7ba02864781a
Created December 12, 2014 07:11
get only status code on curl
curl -LI mazgi.com -o /dev/null -w '%{http_code}\n' -s
@erikcox
erikcox / SimCityLoadingMessages.txt
Created November 11, 2015 21:23
A list of loading messages from the game SimCity, which I repurposed for Slack loading messages.
Adding Hidden Agendas
Adjusting Bell Curves
Aesthesizing Industrial Areas
Aligning Covariance Matrices
Applying Feng Shui Shaders
Applying Theatre Soda Layer
Asserting Packed Exemplars
Attempting to Lock Back-Buffer
Binding Sapling Root System
Breeding Fauna
@ppdeassis
ppdeassis / HOWTO_mailx.sh
Created June 30, 2016 17:50
Setting up mailx to send mail from command line using external server
# ref: https://coderwall.com/p/ez1x2w/send-mail-like-a-boss
# install mailx
yum -y install mailx
# create a directory with a certificate, to send mail using TLS
mkdir ~/.certs
certutil -N -d ~/.cert
# create a user ~/.mailrc, to use custom settings
49 20 6a 75 73 74 20 6e 6f 74 69 63 65 64 20 74 68 69 73 20 62 69 6f 20 74 68 69 6e 67 2e 20 53 6f 20 68 65 72 65 20 79 6f 75 20 67 6f 2e 20 49 20 73 74 61 72 74 65 64 20 70 72 6f 67 72 61 6d 6d 69 6e 67 20 69 6e 20 31 39 37 36 20 77 68 65 6e 20 61 73 20 61 20 79 6f 75 6e 67 6c 69 6e 67 20 49 20 66 6f 75 6e 64 20 74 68 69 73 20 62 6f 6f 6b 20 61 74 20 66 6c 65 61 20 6d 61 72 6b 65 74 20 63 61 6c 6c 65 64 20 22 54 68 65 20 42 2e 41 2e 53 2e 49 2e 43 20 43 6f 6f 6b 62 6f 6f 6b 22 2e 20 49 20 64 69 64 6e 27 74 20 74 68 69 6e 6b 20 69 74 20 77 61 73 20 61 20 63 6f 6f 6b 62 6f 6f 6b 20 62 65 63 61 75 73 65 20 69 6e 73 69 64 65 20 69 74 20 77 61 73 20 63 6f 6d 70 75 74 65 72 20 63 6f 64 65 2e 20 49 20 74 6f 6f 6b 20 74 68 61 74 20 62 6f 6f 6b 20 68 6f 6d 65 20 61 6e 64 20 72 65 61 64 20 69 74 20 62 61 63 6b 20 74 6f 20 66 72 6f 6e 74 20 6d 61 6e 79 20 74 69 6d 65 73 20 61 6e 64 20 65 76 65 6e 20 77 72 6f 74 65 20 73 65 76 65 72 61 6c 20 70 72 6f 67 72 61 6d 73 20 73 61 6e 73 20 61 6e 79 20 63 6f 6d 70 75 74 65 72 2
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active June 29, 2024 01:12
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat