Skip to content

Instantly share code, notes, and snippets.

View ryancdotorg's full-sized avatar

Ryan Castellucci ryancdotorg

View GitHub Profile
@chankruze
chankruze / Compile-Vanila.md
Last active April 6, 2024 07:26
How To Compile OpenWrt Firmware For Any Router

Checking out Source

  • clone latest source repository by git clone https://www.github.com/openwrt/openwrt -b branch_name
  • Now change directory to openwrt by cd openwrt.This is our <buildroot dir> for this guide.

Updating Feeds

  • Update feeds: ./scripts/feeds update -a
  • Make downloaded package(s) available in make menuconfig:
    • single package : ./scripts/feeds install <PACKAGENAME>
    • all packages : ./scripts/feeds install -a

Image Configuration

@maddouri
maddouri / build-static-python.sh
Created December 6, 2015 22:42
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
@mimoo
mimoo / erase_from_memory.h
Last active April 8, 2024 21:17
Include this file to get the `erase_from_memory` function that zeros memory. See https://www.cryptologie.net/article/419/zeroing-memory-compiler-optimizations-and-memset_s/
#ifndef __ERASE_FROM_MEMORY_H__
#define __ERASE_FROM_MEMORY_H__ 1
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdlib.h>
#include <string.h>
void *erase_from_memory(void *pointer, size_t size_data, size_t size_to_remove) {
#ifdef __STDC_LIB_EXT1__
memset_s(pointer, size_data, 0, size_to_remove);
@hammady
hammady / solr.service
Created January 9, 2017 08:18
systemd service file for Apache SOLR
# put this file in /etc/systemd/system/ as root
# below paths assume solr installed in /opt/solr, SOLR_PID_DIR is /data
# and that all configuration exists in /etc/default/solr.in.sh which is the case if previously installed as an init.d service
# change port in pid file if differs
# note that it is configured to auto restart solr if it fails (Restart=on-faliure) and that's the motivation indeed :)
# to switch from systemv (init.d) to systemd, do the following after creating this file:
# sudo systemctl daemon-reload
# sudo service solr stop # if already running
# sudo systemctl enable solr
# systemctl start solr
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@don1138
don1138 / font-stacks.css
Last active April 25, 2024 15:41
CSS Modern Font Stacks
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* System (Bootstrap 5.2.0) */
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@jmshal
jmshal / atob.js
Last active April 27, 2024 04:12
Node.js ponyfill for atob and btoa encoding functions
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};
@AjkayAlan
AjkayAlan / WSLWindows10Setup.md
Last active April 29, 2024 15:43
Windows SubSystem For Linux setup that I like with some developers stuff mixed in

Setting Up WSL

Install A Distro:

  1. Run the following in powershell as admin Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

  2. Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

  3. Open your distro you installed via the start menu, let it setup

  4. Update and upgrade

sudo apt-get update