Skip to content

Instantly share code, notes, and snippets.

@thexdev
thexdev / system-tmp-directory.php
Last active October 22, 2023 19:23
Solve CodieIgniter error with message: mkdir(): Invalid path and Filename: drivers/Session_files_driver.php. This usually happen on mac.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
@jabenninghoff
jabenninghoff / fix-osx-vnc-black-screen.md
Created August 30, 2017 12:21
Fix the VNC "Black Screen" on older versions of OS X

Occasionally on older versions of OS X, connecting to a remote system via VNC will result in a "Black Screen" that is non-responsive. To fix this, kill the loginwindow process:

$ ps ax | grep loginwindow
   83   ??  Ss     0:00.89 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
$ sudo kill 83

loginwindow will automatically restart and the login screen will appear.

Thanks to Mac Mini World!

@AaronRM
AaronRM / facebook-mass-delete-group-members.js
Last active March 23, 2018 14:51 — forked from michaelv/facebook-mass-delete-group-members.js
This javascript removes all users from a facebook group. It works with the new facebook layout. Paste this in the javascript console. Script tested in Firefox. Known issues: 1. when facebook responds slowly, the script might experience hickups.. 2. occasionially, the error 'this user is not a member of the group' pops up.. IMPORTANT: add your ow…
var deleteAllGroupMembers = (function () {
var deleteAllGroupMembers = {};
// the facebook ids of the users that will not be removed.
// IMPORTANT: add your own facebook id here so that the script will not remove yourself!
var excludedFbIds = ['1234','11223344']; // make sure each id is a string!
var usersToDeleteQueue = [];
var scriptEnabled = false;
var processing = false;
deleteAllGroupMembers.start = function() {
@4ndrej
4ndrej / SSLPoke.java
Last active January 3, 2024 09:50
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {