Skip to content

Instantly share code, notes, and snippets.

View misterzik's full-sized avatar
:octocat:
On the hub!

Nick misterzik

:octocat:
On the hub!
  • Nomad, somewhere called earth ...
View GitHub Profile
@cc32d9
cc32d9 / atomicassets_cleos_example.sh
Created June 5, 2021 08:21
AtomicAssets cleos example
alias wtcleos='cleos -v -u https://testnet.wax.pink.gg'
cleos wallet unlock -n testnet
wtcleos push action atomicassets createcol '["cc32dninenft", "loremipsumdo", true, [], [], 0.05, []]' -p cc32dninenft
wtcleos push action atomicassets addcolauth '["loremipsumdo", "cc32dninenft"]' -p cc32dninenft
wtcleos push action atomicassets createschema '["cc32dninenft", "loremipsumdo", "tempor",
[{"name":"name", "type":"string"}, {"name":"commodo", "type":"string"}, {"name":"consequat", "type":"uint32"}, {"name":"ullamco", "type":"float"}]]' -p cc32dninenft
@yoyosan
yoyosan / cleancrap.md
Last active November 15, 2024 12:41
How to clean kdetmpdevfsi or .ICEd-unix suspicious files/folders or processes

Problem

I've recently been hacked on my VPS(using Centos 7.6 and CWP up to date) and the following files/folders were created:

  • /tmp/.ICEd-unix
  • /var/tmp/.ICEd-unix
  • /tmp/kdevtmpfsi
  • /var/tmp/kinsing

The following processes were running and using 100% CPU and Memory:

@bradoyler
bradoyler / node-standards-v6.md
Last active February 5, 2020 05:58
Nodejs (6.x) standards

Node Standards (v6.x)

The 7 Commandments of Node:

  1. processes shall be small, and start instantly
  2. always communicate via message bus (Redis, RabbitMQ)
    • this is intended to avoid blocking IO like a slow HTTP request
  3. each process shall log to stdout
    • it's not the responsibility of the app to route logs
  4. a process shall not maintain state
  • avoid in-memory session ids, socket connections, etc
@misterzik
misterzik / Vanilla Javascript Plugin - Boilerplate
Created December 13, 2016 17:04
Vanilla Javascript Plugin
// Create an immediately invoked functional expression to wrap our code
(function() {
var privateVar = "You can't access me in the console"
}());
@benck
benck / x-editable-bs4.js
Last active January 21, 2021 08:44
A fix for x-editable to be compatible with bootstrap 4.0.0 alpha 5 and jQuery 3.1.1. Make sure you include Tether for bootstrap 4. (The button is changed to Fontawesome, you may change the $.fn.editableform.buttons to your desired buttons.)
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
/**
Form with single input element, two buttons and two states: normal/loading.
Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown.
Editableform is linked with one of input types, e.g. 'text', 'select' etc.
@class editableform
@tomysmile
tomysmile / mac-php-composer-setup.md
Created July 11, 2016 10:45
Setup PHP Composer using Brew
@dduvnjak
dduvnjak / add_cloudflare_ips.sh
Last active April 20, 2025 05:41
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
wget https://www.cloudflare.com/ips-v4
# set the security group ID
SG_ID="sg-00000000000000"
# iterate over the IP ranges in the downloaded file
# and allow access to ports 80 and 443
while read p
do
@dimitardanailov
dimitardanailov / 01-controllers-to-components.md
Last active August 11, 2022 01:25
Angular 2 and Typescript. Thank you to John Papa for awesome online course: http://www.johnpapa.net/angular-2-first-look

Angular 1

<body ng-controller="StoryController as vm">
  <h3>{{ vm.story.name }}</h3>
  <h3 ng-bind="vm.story.name"></h3>
</body>
@pradeepdotco
pradeepdotco / Google-Tag-Manager-WordPress-Plugin-Code
Created February 28, 2016 18:16
Google Tag Manager WordPress Plugin After Body Code
<?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?>
@pradeepdotco
pradeepdotco / Google-Tag-Manager-Sample-Code.php
Created February 27, 2016 11:23
Google Tag Manager Sample Code
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->