Skip to content

Instantly share code, notes, and snippets.

@GMMan
GMMan / ubuntu-gl502vs.md
Last active July 22, 2020 15:30
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

@billyto
billyto / localized2JSON.swift
Last active June 13, 2023 17:32
convert localizable.string files to json format
#!/usr/bin/env swift
//FIRST: chmod +x localized2JSON.swift
//USE: ./localize-strings2json.swift localizable.strings strings.json
//TODO: error checking for parameters and files
//TODO: --help -h
//TODO: separate groups of string in dictionaries?
import Foundation
@Vestride
Vestride / encoding-video.md
Last active May 17, 2024 06:55
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@heldrida
heldrida / javascript
Last active March 11, 2024 17:00
Facebook Javascript SDK: Basic Login and Logout example
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: 'xxxxxxxxxxxxx',
status: true,
cookie: true,
xfbml: true
});
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
require 'rubygems'
require 'sinatra'
require 'datamapper'
require 'dm-paperclip'
require 'haml'
require 'fileutils'
APP_ROOT = File.expand_path(File.dirname(__FILE__))
DataMapper::setup(:default, "sqlite3://#{APP_ROOT}/db.sqlite3")