Skip to content

Instantly share code, notes, and snippets.

View hbayindir's full-sized avatar

Hakan Bayındır hbayindir

View GitHub Profile
@xbb
xbb / README
Last active April 17, 2024 20:21
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@kevin-snippet
kevin-snippet / Raymond Hettinger's Pythonic Codes.md
Last active January 29, 2022 19:29 — forked from JeffPaine/beautiful_idiomatic_python.md
Raymond Hettinger's Pythonic Codes

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
    print i**2
@leolimajr
leolimajr / os-x-enable-trim.txt
Created November 21, 2012 11:10 — forked from clarencesong/os-x-enable-trim.md
Enable TRIM in OS X 10.8.2 for IOAHCIBlockStorage version 2.3.1
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion.
WARNING: This is ONLY tested on 10.8.2 (IOAHCIBlockStorage version 2.3.1), and NOT earlier or later versions.
Check /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2.
Run the following commands in Terminal…
@return1
return1 / trim_enabler.txt
Last active August 25, 2023 02:59
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4+: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
# proxying through apache to a local rails instance, http & https
# apache *.conf file
<VirtualHost *:80>
ServerName psl.localhost
ServerAlias cms.psl.localhost
ServerAlias *.psl.localhost
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/