Skip to content

Instantly share code, notes, and snippets.

@tazjin
tazjin / yants.md
Last active June 15, 2023 22:32
Yet Another Nix Type System (aka YANTS)

yants

Note: Yants now has its own repository.


This is a tiny type-checker for data in Nix, written in Nix.

Features:

@rmi1974
rmi1974 / wine_debugging_of_managed_code_using_windbg_cordbg.md
Last active March 30, 2024 23:09
Debugging of managed code using WinDBG/CorDbg in Wine #wine #debug #dotnet #commandlinefu

Debugging of managed code using WinDBG/CorDbg in Wine

Courtesy of [Wine Bugzilla #46842][1].

Prerequisites

  • Microsoft .NET Framework 4.x installed in WINEPREFIX (use 'winetricks' to install it)
  • Microsoft Debugging Tools for Windows installed in WINEPREFIX. Get them [here (64-bit)][2] and [here (32-bit)][3].

Set native overrides:

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

@icanwalkonwater
icanwalkonwater / gimp_gif_rotate.py
Last active August 30, 2018 12:45
A gimp plugin that allows you to create a rotating gif from your selected layer.
#!/usr/bin/env python
from gimpfu import *
import math
def python_gif_rotate(image, base_layer, rotation=360, amount=60, time=1000, clockwise=True,
center_auto=True, center_x=0, center_y=0, auto_resize=True):
step_rot = rotation / amount
if not clockwise:
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active June 17, 2024 06:45
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
1-In the github repo on Settings > Integration & Services, enable
2-Go to travisCI page and enable the repo
3-Configure the env variables on TravisCI so that it is not necessary to save credentials on github
-in the project Settings on TravisCI, add the entry for netlify site id: NETLIFY_SITE_ID - <site_id from .netlify file generated on netlify create>
-create a netlify access token for TravisCI
-On Netlify Dashboard, Go to Account Settings > OAuth Applications (https://app.netlify.com/account/applications) > Personal access tokens and press New Access Token
-Name it anything, but to make it easier the suggestion is name TravisCI.
-Generate it and COPY it - you won’t see it again!
-in the project Settings on TravisCI, add the entry for netlify personal access token generated for TravisCI: NETLIFY_ACCESS_TOKEN
4-Generate a .travis.yml file in the local repo
@mirhec
mirhec / raspi-setup-gitea.md
Created September 20, 2017 07:14
Installing Gitea on Raspberry Pi with nginx, SSL and automatic backups

Setup Gitea on Raspberry Pi (3)

These instructions are based on this article: https://www.alexruf.net/2016/05/23/setup-gogs-git-service.html.

Setup Raspberry Pi with minimal Raspbian image. You need to connect to the HDMI port and set the following:

sudo raspi-config

There you need to enable the SSH server and you should change the hostname.

@LnL7
LnL7 / configuration.nix
Last active April 7, 2024 01:08
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{
@tjkang
tjkang / index.js
Created March 23, 2017 15:24
Cloud Function for Push Notification
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
/**
* Triggers when new subject added in the list and sends a notification.
*/
exports.sendNotification = functions.database.ref('/subjects/{subjectKey}').onWrite((event) => {
package auth
import (
"context"
"net/http"
"strings"
"google.golang.org/grpc/metadata"
"github.com/andela/micro-api-gateway/pb/authorization"