Skip to content

Instantly share code, notes, and snippets.

@jeetsukumaran
jeetsukumaran / rijndael.py
Created October 17, 2011 02:54
Pure-Python implementation of Rijndael (AES) cipher.
#############################################################################
# Original code ported from the Java reference code by Bram Cohen, April 2001,
# with the following statement:
#
# this code is public domain, unless someone makes
# an intellectual property claim against the reference
# code, in which case it can be made public domain by
# deleting all the comments and renaming all the variables
#
class Rijndael(object):
@timnew
timnew / Rename.ps1
Last active March 15, 2024 13:49
Script to Rename Computer without Reboot
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName
@narthollis
narthollis / Process.md
Last active May 3, 2024 16:12
Ubuntu/Linux Active Directory Kerberos Authentication

#Software#

  • acl
  • attr
  • samba
  • krb5-config
  • krb5-user
  • ldap-utils
  • nscd
  • nslcd
  • ntp
@raelgc
raelgc / Email Server (Linux, Unix, Mac).md
Last active April 28, 2024 15:33
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@alienresident
alienresident / video-fix-videos-for-pseudo-streaming.md
Last active April 20, 2024 05:02
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.

Steps

First check with mediainfo to see if video 'is streamable':

@stephanetimmermans
stephanetimmermans / ubuntu-thunderbird
Created June 25, 2014 12:55
Install Thunderbird on Ubuntu 14.04
echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
sudo apt-get update
sudo apt-get install thunderbird-mozilla-build
@rarylson
rarylson / net-snmp-create-v3-user
Last active April 20, 2023 17:29
"net-snmp-create-v3-user" script for Ubuntu 14.04 (forgotten by the Ubuntu package mantainers)
#!/bin/sh
#
# $Id$
#
# this shell script is designed to add new SNMPv3 users
# to Net-SNMP config file.
prefix=/usr
exec_prefix=/usr
includedir=/usr/include
@skyl
skyl / install.rb
Last active March 21, 2024 17:58
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ''
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
HOMEBREW_CACHE = '/Library/Caches/Homebrew'
HOMEBREW_REPO = 'https://github.com/Homebrew/homebrew'
@JonasGroeger
JonasGroeger / gen-ubuntu-sources-list.py
Created June 16, 2015 09:16
Generates '/etc/apt/sources.list' compatible lists for Ubuntu releases
#!/usr/bin/env python3
import argparse
import getpass
import os
import time
import sys
KNOWN_CODENAMES = ['lucid', 'precise', 'trusty', 'utopic', 'vivid', 'wily']