Skip to content

Instantly share code, notes, and snippets.

View YtvwlD's full-sized avatar

Niklas YtvwlD

View GitHub Profile
@artkirienko
artkirienko / nginx.conf
Last active June 7, 2016 16:57 — forked from Darksecond/nginx.conf
Systemd + Unicorn + Nginx + no-downtime-reload
# The only setting we feel strongly about is the fail_timeout=0
# directive in the "upstream" block. max_fails=0 also has the same
# effect as fail_timeout=0 for current versions of nginx and may be
# used in its place.
# you generally only need one nginx worker unless you're serving
# large amounts of static files which require blocking disk reads
worker_processes 1;
# # drop privileges, root is needed on most systems for binding to port 80
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import random as r
# https://pyzufall.readthedocs.io/
from pyzufall.generator import verbt, objekt
for i in range(1, 100):
s = objekt()
#!/bin/bash
#
# 4633c8a2a16a8e0428d253baafb76bbc18f29562390c84d1c85ba98865531a2b
CRYPTER="base64 -b 78"
HEADER="----BEGIN PGP MESSAGE----"
FOOTER="-----END PGP MESSAGE-----"
do_encryption() {
local plain="$1"
@Lusito
Lusito / mozilla-workshop-mozfest-2019.md
Last active November 17, 2019 21:49
Mozilla workshop about Manifest V3 and the Recommended Extensions Program.

Mozilla Workshop Summary.

Some time ago, I've been invited by Mozilla to attend a workshop on the topic of Manifest V3 and the future of the Recommended Extensions Program. Mozilla was paying for the whole trip: Cost of travel, accommodations, food, and even tickets for Mozfest 2019, which was held the two days after. So it was an obvious choice to accept this invitation.

I took the opportunity to collect some thoughts on these topics from different communities:

On October 25th 2019 the workshop took place at Mozillas London office on the day before MozFest and I just

@emilisto
emilisto / segfault.c
Created March 18, 2014 13:34
C99 problem with strdup
/*
* $ gcc -std=c99 -o segfault segfault.c -lpthread
* segfault.c: In function ‘thread_fn’:
* segfault.c:7:5: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
* segfault.c:7:17: warning: initialization makes pointer from integer without a cast [enabled by default]
* $ ./segfault
* Segmentation fault
*/
#include <stdio.h>
@zakx
zakx / damazon.py
Last active August 30, 2020 00:01 — forked from trehn/damazon.py
#!/usr/bin/python2
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
# Session setup
@jjb
jjb / gist:996292
Created May 27, 2011 22:11
How to securely acquire the Mozilla root certificate bundle for use with curl, Net::HTTP, etc.

If you want to use curl or net-http/open-uri to access https resources, you will often (always?) get an error, because they don't have the large number of root certificates installed that web browsers have.

You can manually install the root certs, but first you have to get them from somewhere. This article gives a nice description of how to do that. The source of the cert files it points to is hosted by the curl project, who kindly provide it in the .pem format.

problem: Sadly, ironically, and comically, it's not possible to access that file via https! Luckily, the awesome curl project does provide us with the script that they use to produce the file, so we can do it securely ourselves. Here's how.

  1. git clone https://github.com/bagder/curl.git
  2. cd curl/lib
  3. edit mk-ca-bundle.pl and change:
@davefp
davefp / LICENSE.md
Last active April 1, 2021 04:30
Weather Widget for Dashing

The MIT License (MIT)

Copyright (c) 2014 David Underwood

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@indrora
indrora / 00readme.md
Last active November 12, 2021 07:24
DeadUpdate: Kickin' it bigtime.

... my first disclosure. Man, it feels weird doing this.

update 6/6/16 I would like to stress something: I'm not saying "Don't buy an ASUS device" -- I see a lot of people who want to lambaste ASUS for this and boycott their hardware. This isn't what I want people to be doing by any stretch. Stupidly, I like the ASUS hardware I have (it's nice for the price) and I would rather see a pressure on ASUS as an OEM to stop shipping "value added software" to consumers; If you want to help Microsoft in pushing this mentality, go buy a signature machine from them. Microsoft provides support, but also only ships windows and a few select utilities that are essential to the functioning of the system (think: Radeon/Optimus and nVidia control panels) and fall heavily on the hardware makers (ATI, nVidia, Intel) to provide support for the harware.

Consider an ASUS device all you want. Start putting pressure on Microsoft that consumers want bloat-free devices and start voting with your money. Microsoft's store

@archon810
archon810 / BuildConfig.java
Last active September 28, 2022 15:17
Fake Virus Shield AV
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";