Skip to content

Instantly share code, notes, and snippets.

View bluemix's full-sized avatar
🖐️
Hello There :D

Abdu Bsruki bluemix

🖐️
Hello There :D
View GitHub Profile
class StringProvider {
operator fun provideDelegate(
thisRef: Main,
prop: KProperty<*>
): ReadOnlyProperty<Main, String> {
if(checkProperty(thisRef, prop.name)) {
return object : ReadOnlyProperty<Main, String> {
override fun getValue(thisRef: Main, property: KProperty<*>): String {
return "true string"
}

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@collinjackson
collinjackson / main.dart
Last active August 17, 2023 20:06
PageView example with dots indicator
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
@ilyasProgrammer
ilyasProgrammer / date_compare.py
Last active January 29, 2023 08:07
Odoo compare datetime and date in domain. Current day, week, month, year in domain.
# in xml:
# Current day:
domain="[('some_date_time', '&gt;', (context_today()-datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d')),('start_time', '&lt;', (context_today()+datetime.timedelta(days=1)).strftime('%%Y-%%m-%%d'))]
# Current week:
domain="[('some_date_time', '&gt;=', (context_today()-datetime.timedelta(days=context_today().weekday())).strftime('%%Y-%%m-%%d')),('start_time', '&lt;=', (context_today()-datetime.timedelta(days=context_today().weekday())+ datetime.timedelta(days=6)).strftime('%%Y-%%m-%%d'))]
# Current year:
domain="[('some_date_time', '&gt;=', (datetime.date(datetime.date.today().year, 1, 1)).strftime('%%Y-%%m-%%d')),('start_time', '&lt;=', (datetime.date(datetime.date.today().year, 12, 31)).strftime('%%Y-%%m-%%d'))]
#in python:
yesterday = datetime.datetime.now() - datetime.timedelta(days = 2)
@NeoTheFox
NeoTheFox / kitty.conf
Last active August 6, 2021 05:47
kitty config with solarized dark theme
# vim:fileencoding=utf-8:ft=conf
# Font family. You can also specify different fonts for the
# bold/italic/bold-italic variants. By default they are derived automatically,
# by the OSes font system. Setting them manually is useful for font families
# that have many weight variants like Book, Medium, Thick, etc. For example:
# font_family Operator Mono Book
# bold_font Operator Mono Thick
# bold_italic_font Operator Mono Medium
font_family Hack
@chinmaygarde
chinmaygarde / FlutterEmbedderGLFW.cc
Last active March 27, 2025 01:57
Flutter Embedder API Example (GLFW with OpenGL)
#include <assert.h>
#include <chrono>
#include <embedder.h>
#include <glfw3.h>
#include <iostream>
static_assert(FLUTTER_ENGINE_VERSION == 1, "");
static const size_t kInitialWindowWidth = 800;
@khornberg
khornberg / encode_decode_dictionary.py
Created August 25, 2017 12:39
python 3 base64 encode dict
"""
Given a dictionary, transform it to a string. Then byte encode that string. Then base64 encode it and since this will go
on a url, use the urlsafe version. Then decode the byte string so that it can be else where.
"""
data = base64.urlsafe_b64encode(json.dumps({'a': 123}).encode()).decode()
# And the decode is just as simple...
data = json.loads(base64.urlsafe_b64decode(query_param.encode()).decode())
# Byte encode the string, base64 decode that, then byte decode, finally transform it to a dictionary
@bradley
bradley / Digital-Ocean-SSH-and-Subdomains.md
Last active February 5, 2022 04:05
Digital Ocean SSH and Subdomains

Basic Getting Started Ubuntu 16.04

SSH into your server at root:

ssh root@myserver.com

Crate a new user:

adduser my_username

Make the new user a sudo user:

@Piasy
Piasy / install_ffmpeg.sh
Last active April 14, 2026 11:41
brew install ffmpeg with all options
brew options ffmpeg
brew install ffmpeg \
--with-chromaprint \
--with-fdk-aac \
--with-fontconfig \
--with-freetype \
--with-frei0r \
--with-game-music-emu \
--with-libass \
@dsternlicht
dsternlicht / i18n.js
Created November 13, 2017 11:38
i18n.js file with moment.js
import ReactNative from 'react-native';
import I18n from 'react-native-i18n';
import moment from 'moment';
// Import all locales
import en from './en.json';
import he from './he.json';
// Should the app fallback to English if user locale doesn't exists
I18n.fallbacks = true;