Skip to content

Instantly share code, notes, and snippets.

View nolochemical's full-sized avatar

Victor Phelemba nolochemical

  • Toronto, Ontario
View GitHub Profile
@hjeffrey
hjeffrey / ramdisk.sh
Created October 22, 2019 04:05
Ramdisk For XCode
# install to $HOME/.ramdisk
# initramdisk.sh - make a ramdisk, the default size is 6GB.
# syncramdisk.sh - sync files of ramdisk to disk, when logout.
# makeRamDiskWhenRestart.sh - make Hook, LoginHook and LogoutHook. LoginHook for initramdisk.sh, LogoutHook for syncramdisk.sh.
# moveXcodeCacheToRamDisk.sh - run shell above, then move xcode cache folder to ramdisk.
# ---------------- initramdisk.sh ------------------
#!/usr/bin/env sh
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active December 16, 2023 08:55
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active October 9, 2024 11:32
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory