Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nikitasius's full-sized avatar
💭
🍆

Nikita S. nikitasius

💭
🍆
  • toxId: 4339E5C156D4858940E20F82BE6625BC69B4167EAE1E9924EF79AA474E2A454BE4323FE37C61
  • public static void main (String[] args){}
View GitHub Profile
@nikitasius
nikitasius / linux-usb-file-copy-fix.md
Created September 22, 2022 15:36 — forked from 2E0PGS/linux-usb-file-copy-fix.md
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@nikitasius
nikitasius / gist:3fb1b29244b3065eae85237313814579
Created March 31, 2022 12:43 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@nikitasius
nikitasius / readme.md
Last active July 13, 2022 05:04
own wireguard vpn
  • Install Wireguard aptitude install wireguard
  • create keys for your node
    • cd /etc/wireguard/
    • umask 077; wg genkey | tee wg0.key | wg pubkey > wg0.pub

Next make your config touch /etc/wireguard/wg0.conf, inside you can put this:

#VPN

[Interface]
@nikitasius
nikitasius / debian 11.md
Last active March 2, 2022 15:30
well well well debian 11

Keybase proof

I hereby claim:

  • I am nikitasius on github.
  • I am nikitasius (https://keybase.io/nikitasius) on keybase.
  • I have a public key whose fingerprint is EFED B03E 3DE4 3772 FE73 4473 E151 C0BE 20CE 81BE

To claim this, I am signing this object:

@nikitasius
nikitasius / readme.md
Created April 8, 2018 21:37
roundcube file upload failed / roundcube attachments not working / roundcube upload problem / empty attachements / zero file uploads

The problem

When you attach a file, roundcube tells you: File upload failed

I understand you

When you fixed all what you think and even fullfilled some php vars like base_dir and pack of upload* variables and you still see empty files and you wanna remove this #$%^!, just relax and..

Solution

In a config file keep/add in active plugins filesystem_attachments and remove database_attachments (if you had it).

They can't work together and attachements needs at least a filesystem_attachments.

@nikitasius
nikitasius / readme.md
Last active August 4, 2021 08:11
own DNS for NGINX (and whole system too) with DNSSEC from google DNS
  • install dnsmasq (2.78+, cause 2.72 is bugged with certain DNS, including cloudflare)
  • /etc/dnsmasq.conf:
port=53
listen-address=127.0.0.1
interface=lo
bind-interfaces
dnssec
dnssec-check-unsigned
trust-anchor=.,19036,8,2,49AAC11D7B6F6446702E54A1607371607A1A41855200FD2CE1CDDE32F24E8FB5
@nikitasius
nikitasius / IntelliJ IDEA & GIT (ssh)
Created February 22, 2018 19:53
8:43 PM Push failed: your_reponame_is_here: failed with error: Could not read from remote repository.
8:43 PM Push failed: your_reponame_is_here: failed with error: Could not read from remote repository.
==> idea.log <==
2018-02-22 20:46:48,111 [ 306076] INFO - ellij.ide.PrivacyPolicyUpdater - Error updating privacy policy: Connection refused (Connection refused)
2018-02-22 20:47:02,328 [ 320293] INFO - #git4idea.commands.GitHandler - [your_reponame_is_here] git -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:master
2018-02-22 20:47:04,700 [ 322665] INFO - #git4idea.commands.GitHandler - java.io.IOException: There was a problem while connecting to github.com:22
2018-02-22 20:47:04,701 [ 322666] INFO - #git4idea.commands.GitHandler - at com.trilead.ssh2.Connection.connect(Connection.java:817)
2018-02-22 20:47:04,701 [ 322666] INFO - #git4idea.commands.GitHandler - at com.trilead.ssh2.Connection.connect(Connection.java:686)
2018-02-22 20:47:04,701 [ 322666] INFO - #git4idea.commands.GitHandler - at com.trilead.ssh2.Connection.connect

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

go to https://curl.haxx.se/docs/caextract.html

https://curl.haxx.se/ca/cacert.pem in /etc/ in chroot

add this into php-fpm profiles

php_admin_value[curl.cainfo] = /etc/cacert.pem
php_admin_value[openssl.cafile] = /etc/cacert.pem