Skip to content

Instantly share code, notes, and snippets.

🏕
Working remotely

Leo Nikkilä lnikkila

🏕
Working remotely
Block or report user

Report or block lnikkila

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.js
import React from 'react';
import {AppRegistry, LayoutAnimation, StyleSheet, Text, UIManager, View} from 'react-native';
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
class LayoutAnimationTest extends React.Component {
constructor(props) {
super(props);
View index.js
import React from 'react';
import {AppRegistry, LayoutAnimation, StyleSheet, Text, UIManager, View} from 'react-native';
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
class LayoutAnimationTest extends React.Component {
constructor(props) {
super(props);
@lnikkila
lnikkila / pull_files.py
Last active Jan 19, 2018
Pull specific app files from an unencrypted iOS backup.
View pull_files.py
#!/usr/bin/env python3
# Pull specific files from an unencrypted iOS backup.
#
# ## Examples
#
# ./pull_files.py ~/backup ~/all_backup_files.zip
# ./pull_files.py -d '%com.example.app%' ~/backup ~/app_files.zip
import argparse
import pathlib
import sqlite3
@lnikkila
lnikkila / README.md
Last active Aug 29, 2017
Twilio signature header for Paw
View README.md

Twilio signature header for Paw

Set up an HMAC-SHA1 header with the attached script as the input, and your Twilio secret as the key like this:

screen shot 2017-08-29 at 09 16 33

The script will calculate a correct signature for any request you throw at it.

@lnikkila
lnikkila / keybase.md
Created May 14, 2017
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am lnikkila on github.
  • I am lnikkila (https://keybase.io/lnikkila) on keybase.
  • I have a public key ASACtADePGpdUnqYtThROtj3XggJL2zuYcSWGf-_cFSXGgo

To claim this, I am signing this object:

View bookmarklet.md
Bookmarklet

Copy and paste this into a bookmark:

javascript:!function(d){d.head.appendChild(d.createElement("style")).innerText="html,img,video{-webkit-filter:invert(1)hue-rotate(180deg);filter:invert(1)hue-rotate(180deg)}body{background:#000}"}(document);
@lnikkila
lnikkila / gist:e9572f21fd005dd06740
Last active Jan 16, 2018
Flashing a custom ROM (CyanogenMod) using OS X on Samsung Galaxy Tab 10.1 (WiFi) a.k.a. GT-P7510 a.k.a. p4wifi.
View gist:e9572f21fd005dd06740

CyanogenMod was discontinued, but I’ll keep this up since you can probably try to flash something else using this. Also Heimdall is still very useful but not much talked about. You should probably use TWRP Recovery instead of ClockworkMod these days.

First install Heimdall using Homebrew Cask. You can also download the .pkg and install it manually. Heimdall includes a kext, so you need to reboot after installation.

View 404.html
<a id="alert-twitter"
href="https://twitter.com/intent/tweet?text=%40lnikkila+Hey%2C+this+link+is+dead%3A&amp;url=">
Twitter link
</a>
<a id="alert-email"
href="mailto:hello@lnikki.la?subject=Found+a+dead+link&amp;body=Hey%2C+this+link+is+dead%3A+">
Email link
</a>
View _luma.scss
/*
* Calculates the sRGB luma of a colour.
*
* Math nicked from a great Thoughtbot article by Reda Lemeden:
* http://robots.thoughtbot.com/closer-look-color-lightness
*/
@function luma($c) {
$-local-red: red(rgba($c, 1.0));
$-local-green: green(rgba($c, 1.0));
You can’t perform that action at this time.