Skip to content

Instantly share code, notes, and snippets.

View aslafy-z's full-sized avatar

Zadkiel AHARONIAN aslafy-z

View GitHub Profile
<script>
// A simple function to copy a string to clipboard. See https://github.com/lgarron/clipboard.js for a full solution.
var copyToClipboard = (function() {
var _dataString = null;
document.addEventListener("copy", function(e){
if (_dataString !== null) {
try {
e.clipboardData.setData("text/plain", _dataString);
e.preventDefault();
#!/usr/bin/perl -w
use strict;
use IO::Socket::INET;
use IO::Socket::SSL;
use Getopt::Long;
use Config;
#./ddos.pl -dns ip -port 80 -num 500
$SIG{'PIPE'} = 'IGNORE'; #Ignore broken pipe errors
print <<EOTEXT;
@aslafy-z
aslafy-z / export_chrome_to_enpass.js
Last active October 19, 2016 23:42 — forked from beaverb1ll/ExportChromePasswords.js
export_chrome_to_enpass.js
var row='';
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
row += 'url,username,password,extra,name,grouping,fav';
for(i=0; i<model.length; i++) {
@aslafy-z
aslafy-z / snippy.sh
Created April 13, 2017 10:56 — forked from coderofsalvation/snippy.sh
modified version of snippy which features easier installation, follows symlinks, bashdown templates and automatic detection of cli vs window
#!/bin/bash
# video demo at: http://www.youtube.com/watch?v=90xoathBYfk
# written by "mhwombat": https://bbs.archlinux.org/viewtopic.php?id=71938&p=2
# Based on "snippy" by "sessy"
# (https://bbs.archlinux.org/viewtopic.php?id=71938)
#
# You will also need "dmenu", "xsel" and "xdotool". Get them from your linux
# distro in the usual way.
#
@aslafy-z
aslafy-z / db-far.php
Created June 1, 2018 13:50 — forked from KLicheR/db-far.php
PHP script that perform a find and replace in a database dump (tested with MySQL) with adjustments of the PHP serialize founded.
#!/usr/bin/php
<?php
/**
* PHP script that perform a find and replace in a database dump (tested with
* MySQL) with adjustments of the PHP serialize founded.
*
* Don't forget to escape your "special characters":
* "a$b" -> "a\$b"
* "a"b" -> "a\"b"
* "a`b" -> "a\`b"
@aslafy-z
aslafy-z / functions.php
Last active June 19, 2018 10:57 — forked from cjmosure/functions.php
Disable single Wordpress plugin update notifications
<?php
// Disable update notification for individual plugin (current)
function filter_plugin_updates($value) {
if ($value) {
unset($value->response[plugin_basename(__FILE__)]);
}
return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );
?>
@aslafy-z
aslafy-z / index.html
Created July 22, 2018 14:48 — forked from chrisvfritz/index.html
Simplest possible HTML template
<!doctype html>
<html>
<head>
<title>This is the title of the webpage!</title>
</head>
<body>
<p>This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents.</p>
</body>
</html>
@aslafy-z
aslafy-z / serveo-tunnel@.service
Last active February 16, 2024 15:03 — forked from guettli/ssh-tunnel@.service
Reliable persistent SSH-Tunnel via systemd (not autossh)
# Reliable persistent SSH-Tunnel via systemd (not autossh)
# https://gist.github.com/aslafy-z/24e2ddb02fa269444620eab1bcfe2932#file-serveo-tunnel-service
#
# Usage: systemctl start serveo-tunnel@[tunnel-string] (see https://serveo.net for details)
# systemctl start serveo-tunnel@mytunnel:80:localhost:8080
# systemctl enable serveo-tunnel@mytunnel:80:localhost:8080 (to make it persist reboot)
[Unit]
Description=Serveo tunnel for %i
After=network.target
@aslafy-z
aslafy-z / centos.repo
Last active June 24, 2019 07:58 — forked from slapo/wandisco-git.repo
CentOS 6 base repository
[centos]
name=centos
baseurl=http://mirror.centos.org/centos/6/os/x86_64/
enabled=0
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
@aslafy-z
aslafy-z / docker-compose-systemd-unit.md
Last active February 23, 2024 15:59 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service

[Unit]
Description=%i service with docker compose
# Requires=docker.service
# After=docker.service