Skip to content

Instantly share code, notes, and snippets.

View MairwunNx's full-sized avatar
🎆
Working

Pavel Erokhin MairwunNx

🎆
Working
View GitHub Profile
@traysr
traysr / l10n_IETF_Language_tags.md
Created March 8, 2012 14:58
Commonly used IETF language tags
@jamesthompson
jamesthompson / JavaFXImageConversion.java
Created August 13, 2012 21:03
JavaFX Image from a byte array
import javafx.scene.image.Image;
import javax.imageio.ImageIO;
import java.awt.image.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
public Image getJavaFXImage(byte[] rawPixels, int width, int height) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ImageIO.write((RenderedImage) createBufferedImage(rawPixels, width, height), "png", out);
@wouterj
wouterj / post.md
Last active July 13, 2021 02:00
How to use Jekyll, Plugins and Sass on GitHub Pages

How to use Jekyll, Plugins and Sass on GitHub Pages

Jekyll is a great CMS for developers and GitHub Pages is a great host to store your Jekyll sites. There is just one problem, GitHub runs Jekyll in safe mode, which means you can't use plugins. One thing you can do is building the Jekyll website locally and then push to GitHub.

Alexandre Rademaker found a solution to do this easially, which is quite usefull: "GitHub Pages and Jekyll plugins" After reading this I thought, that can be done easier!

Aliases to rescue

Git provides a way to have aliases of bash commands. You can do this by adding items to the alias key of your configuration. For this, you can add this locally by adding this lines to your %PROJECT_ROOT%/.git/config file:

@hofmannsven
hofmannsven / README.md
Last active June 17, 2024 10:34
Git CLI Cheatsheet
@pelenthium
pelenthium / Launcher.java
Created March 16, 2015 15:59
Sample JavaFX application for use Nashorn JavaScript Engine in jdk8
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import jdk.nashorn.api.scripting.NashornScriptEngine;
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
@mstroeck
mstroeck / DesktopToastsSample.cpp
Last active June 21, 2024 12:49 — forked from CalvinLinTrend/DesktopToastsSample.cpp
Toast Notification in Win32 app with COM server
#include "stdafx.h"
#include <wrl/module.h>
#include "ToastNotificationActivationCallback.h"
#include "DesktopToastsSample.h"
// This is taken from: http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/10/16/quickstart-handling-toast-activations-from-win32-apps-in-windows-10.aspx
DWORD g_allLocks;
// Main function
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active June 28, 2024 03:43
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@scionoftech
scionoftech / google_translator_selenium.py
Created January 1, 2020 13:54
Google translator using Selenium
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.chrome.options import Options
import time
try:
language_code = "te"
chrome_options = Options()
#chrome_options.add_argument("--disable-extensions")
#chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--headless")
@MidSpike
MidSpike / readme.md
Last active February 5, 2024 18:09
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware