Skip to content

Instantly share code, notes, and snippets.

View Sophrinix's full-sized avatar

Andrew McElroy Sophrinix

View GitHub Profile
@akihikodaki
akihikodaki / README.en.md
Last active May 11, 2024 02:14
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.

React Native + macOS + Clojurescript

image

Project Catalyst

Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.

This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).

@hansemannn
hansemannn / skill-studentenfutter.js
Last active March 14, 2017 22:26
Ask Alexa for todays canteen lunches.
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"] */
/**
* Ask Alexa for todays canteen lunches.
**/
'use strict';
const https = require('https');
@hansemannn
hansemannn / ti.dynamiclib.js
Last active July 10, 2017 15:49
Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop
/**
* Ti.DynamicLib
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop.
* @version 1.1.0
*
* Install:
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location.
The path is relative to the `build/iphone` directory.
* 2a) For classic modules:
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)'
@shagunsodhani
shagunsodhani / Batch Normalization.md
Last active July 25, 2023 18:07
Notes for "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift" paper

The Batch Normalization paper describes a method to address the various issues related to training of Deep Neural Networks. It makes normalization a part of the architecture itself and reports significant improvements in terms of the number of iterations required to train the network.

Issues With Training Deep Neural Networks

Internal Covariate shift

Covariate shift refers to the change in the input distribution to a learning system. In the case of deep networks, the input to each layer is affected by parameters in all the input layers. So even small changes to the network get amplified down the network. This leads to change in the input distribution to internal layers of the deep network and is known as internal covariate shift.

It is well established that networks converge faster if the inputs have been whitened (ie zero mean, unit variances) and are uncorrelated and internal covariate shift leads to just the opposite.

@skoji
skoji / remove-slack-settings.sh
Created November 2, 2015 03:34
remove Slack settings (OS X)
rm -rf ~/Library/Application\ Support/Slack/
rm -rf ~/Library/Containers/com.tinyspeck.slackmacgap/
rm -rf ~/Library/Preferences/com.tinyspeck.slackmacgap.plist
rm -rf ~/Library/Saved\ Application\ State/com.tinyspeck.slackmacgap.savedState
rm ~/Library/Safari/LocalStorage/*slack*
@edpaget
edpaget / postgresql_reconnect.rb
Created June 30, 2015 17:41
Postgresql Reconnect Error
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# Activate the gem you are reporting the issue against.
@frntn
frntn / gist:f25726df962fc29c6dde
Last active November 1, 2023 15:18
azure-cli cheatsheet
azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment
@UnquietCode
UnquietCode / Lava Lamp RNG.md
Created April 19, 2015 18:52
Lava Lamp Random Number Generator

Lava Lamp Random Number Generator

(extracted from the now defunct SGI project at http://lavarand.sgi.com/cgi-bin/how.cgi via the magical Internet Archive Wayback Machine)

Lava Lamps can be used as a source of randomness, which can be used to establish a random number generator. The output of the RNG can then be consumed by various computer applications.

Step 1: Establish a chaotic system

(Set up Lava Lite® lamps in a machine room.)

@jasonkneen
jasonkneen / index.xml
Last active July 11, 2020 14:07
Flipboard style tabgroup indicator for iOS. Drop tabIndicator.js into your Alloy lib folder, then add the module tag to your tabgroup and parameters to override the defaults. As you click on each tab, the indicator will slide across. VIDEO https://www.dropbox.com/s/cbw5e1ruksud9uo/tabindicator.mp4?dl=0
<!-- note the ONLY change to this is the additional module="tabIndicator"
attribute + properties to override indicator defaults //-->
<Alloy>
<TabGroup module="tabIndicator" tabsBackgroundColor="#000" tabIndicatorHeight="1" tabIndicatorColor="white" tabIndicatorWidth="75%">
<Tab title="Tab 1" icon="/images/icons/519-tools-1.png" activeIcon="/images/icons/519-tools-1_active.png" color="#555" activeColor="#fff">
<Window title="Tab 1" barColor="black" navTextColor = "#fff">
<Label onClick="openWin1">Tab 1</Label>
</Window>
</Tab>
<Tab title="Tab 2" icon="/images/icons/516-archive-box.png" activeIcon="/images/icons/516-archive-box_active.png" color="#555" activeColor="#fff">