Skip to content

Instantly share code, notes, and snippets.

View teamday's full-sized avatar
🍍
I may be slow to respond.

Roman S teamday

🍍
I may be slow to respond.
View GitHub Profile
#ifndef LV_ATTRIBUTE_IMG_GR
#define LV_ATTRIBUTE_IMG_GR
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GR uint8_t gr_map[] = {
#if CONFIG_NICE_VIEW_WIDGET_INVERTED
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
#else
0x00, 0x00, 0x00, 0xff, /*Color of index 0*/
#!/usr/bin/env bash
#hashapass: implement the algorithm from hashapass.com as a shell script
#nick@kousu.ca, Sep 8, 2013 -- 2015
#public domain <http://creativecommons.org/publicdomain/zero/1.0/>
#usage: hashapass [-l] [-s] [parameter]
# requirements:
# bash(?)
# openssl
# zenity [OPTIONAL] (for GUI interface)
tar czvf - wwwdata | gpg --cipher-algo aes256 --symmetric | ssh root@localhost "cat - > /backup/wwwdata.tgz.gpg"
gpg -d wwwdata.tgz.gpg | tar xvz
# Increase number of max open-files
fs.file-max = 150000
# Increase max number of PIDs
kernel.pid_max = 4194303
# Increase range of ports that can be used
net.ipv4.ip_local_port_range = 1024 65535
# https://tweaked.io/guide/kernel/
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
partial class Interop
{
const string LIBC = "libc";
section .data
child db "/bin/sh", 0
global _start
section .text
_start:
mov rdi, child
lea rsi, [rsp + 8]
mov rdx, 0
//setup our DI
var serviceProvider = new ServiceCollection()
.AddLogging()
.AddSingleton<IFooService, FooService>()
.AddSingleton<IBarService, BarService>()
.BuildServiceProvider();
//configure console logging
serviceProvider
.GetService<ILoggerFactory>()
@teamday
teamday / Curve25519.cs
Created August 16, 2018 19:45 — forked from hanswolff/Curve25519.cs
C# implementation of Curve25519
/* Ported parts from Java to C# and refactored by Hans Wolff, 17/09/2013
Original: https://github.com/hanswolff/curve25519
*/
/* Ported from C to Java by Dmitry Skiba [sahn0], 23/02/08.
* Original: http://code.google.com/p/curve25519-java/
*/
/* Generic 64-bit integer implementation of Curve25519 ECDH
* Written by Matthijs van Duin, 200608242056
#/etc/default/dnsmasq
IGNORE_RESOLVCONF=yes
@teamday
teamday / tmux-cheatsheet.markdown
Created June 27, 2018 04:00 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname