Skip to content

Instantly share code, notes, and snippets.

View plainprogrammer's full-sized avatar

James Thompson plainprogrammer

View GitHub Profile
diff --git a/Configure b/Configure
index 494e0b3..d39a7e1 100755
--- a/Configure
+++ b/Configure
@@ -652,6 +652,7 @@ my %table=(
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"debug-darwin64-x86_64-cc","cc:-arch x86_64 -ggdb -g2 -O0 -DL_ENDIAN -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:".eval{my $asm=$x86_64_asm;$asm=~s/rc4\-[^:]+//;$asm}.":macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLI
@plainprogrammer
plainprogrammer / redis-3.2-arm64.patch
Created May 10, 2021 17:28
Patch Redis 3.2 code to compile cleanly for Apple M1 Macs (ARM)
diff --git a/src/debug.c b/src/debug.c
index 1ecb251bd..d4d2f0508 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -662,8 +662,10 @@ static void *getMcontextEip(ucontext_t *uc) {
/* OSX >= 10.6 */
#if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
return (void*) uc->uc_mcontext->__ss.__rip;
- #else
+ #elif defined(__i386__)
@plainprogrammer
plainprogrammer / personal.gpg.pub
Last active March 24, 2021 20:23
Personal GPG Public Key — james@thomps.onl (Issued 2021.03.24)
-----BEGIN PGP PUBLIC KEY BLOCK-----
mJMEYFudMhMJKyQDAwIIAQENBAMEPk4iSzIwjx5fxDcCC6uVqgIbEnjvHpevE4vA
b3iv6uYKIDHN+Sng3iCvAi5+0EIi/56oTMyqcdV50jp9zql4zw2dgNPtqLOtDNA0
gqE96lqa9K8/Jw80v4Jq5AnjxyF2JvfG2MXtfte7VDSYQbFxYuyZ/fCtyGKfIlVb
NBl0+XO0IUphbWVzIFRob21wc29uIDxqYW1lc0B0aG9tcHMub25sPojQBBMTCgA4
FiEEx3ngATyWOe60Makd3ciCLJ6FCWgFAmBbnTICGwEFCwkIBwIGFQoJCAsCBBYC
AwECHgECF4AACgkQ3ciCLJ6FCWhYjQH/dnbugU97DwCTSaiwK4IOfCq61Hg4Go6b
tKCJMBAEEzv3ncUt8PRbEf3UynLOSUn9SCIX995I0HhRw/jn2sSF7wH/UU0IFA8+
oEcaACe7t8iaao3DAUIoWi7tx56XvneJ9T4T0j8pDRQIDR+kpZ3iIISuxw7fJJ7x
@plainprogrammer
plainprogrammer / mavenlink.pub
Created December 1, 2020 02:49
GPG Public Keys
BEGIN MESSAGE.
gqqmeYc8GwQ3NTc 8gqsearOP49PyHx HziRXWYQjNAT1cB faoSOEjRYkhk6aS
kNh4l3WiC5eMSFI 23hjolMGkx4TCKq 6Xr2MZHgg6nv2OV 6Tbea16Nd6GONPl
Bfq3hFlI9BQktVE gXBbfgfw6bXCszy dPYFXr9JwD1nAOL 3j2TF5lR5HOkUY8
2bvbpvJwznjAgMG xiw2FOCIYiDH2rP KbigE1N5kVsSvb2 JIGj.
END MESSAGE.

Keybase proof

I hereby claim:

  • I am plainprogrammer on github.
  • I am plainprogrammer (https://keybase.io/plainprogrammer) on keybase.
  • I have a public key ASBc2-7Zt54OhRy1XbbESbRzPIL36TuAmOryyeOo58WWiwo

To claim this, I am signing this object:

Vineyard charter school under state scrutiny

Braley Dodson Daily Herald 17 hrs ago

The State Charter School Board, part of the Utah State Board of Education, did not take any action on closing a charter school Friday evening after concerns of student safety were brought forward.

The state charter board met to consider taking action on Franklin Discovery Academy in Vineyard, which opened Aug. 22 and teaches about 500 students in kindergarten through sixth grade. However, the board was ultimately unable to act on the matter because it did not issue a notice for the meeting 24 hours in advance.

The board has scheduled a meeting for 7 p.m. Saturday where possible action could be taken, which could include giving the school a warning, putting it on probation, allowing another entity to take over the school or voting to terminate the school.

#!/usr/bin/ruby
rev_10_file = File.open('rev_10.rev', 'a')
rev_172_file = File.new('rev_172.txt', 'w+')
rev_192_file = File.new("rev_192.txt", "w+")
Dir['/Users/andybaxter/bind/*.com'].each do |filename|
File.open(filename, 'r+').readlines.each do |line|
domain = line.split.first
ip = line.split.last
current_user = User.where(full_name: "Jane Fonda").first
current_user.connections.where("full_name LIKE ?", "%bus%").select(:id, :full_name)
#
# User Load (0.6ms)
# SELECT `users`.`id`, `users`.`full_name` FROM `users`
# INNER JOIN `contacts` ON `users`.`id` = `contacts`.`connection_id`
# WHERE `contacts`.`user_id` = 980204181
# AND (full_name LIKE '%bus%')
#
# => #<ActiveRecord::AssociationRelation [
@plainprogrammer
plainprogrammer / scary_service.rb
Last active October 28, 2015 18:02
Scary Reorder Service
module Services
module Column
class Reorder
attr_reader :column_to_move, :column_before, :column_set
def initialize(column_to_move_id, column_before_id = nil)
@column_to_move = ::Column.find(column_to_move_id)
@column_before = ::Column.find(column_before_id) if column_before_id.present?
@column_set = @column_to_move.column_set
end