Skip to content

Instantly share code, notes, and snippets.

yes the whole earth

Alberto Ramos Shujito

yes the whole earth
Block or report user

Report or block Shujito

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 setting_up_a_new_remote_git_repository.textile

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

zeuxisoo / gist:1008973
Created Jun 5, 2011
[Android] Create and Remove Desktop Shortcut
View gist:1008973


private void addShortcut(){  
	Intent shortcut = new Intent("");
	// Shortcut name
	shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));  
	shortcut.putExtra("duplicate", false);	// Just create once
lukeredpath / ExampleClass.m
Created Jun 30, 2011
Macro for creating your "shared instance" using GCD
View ExampleClass.m
@implementation MySharedThing
+ (id)sharedInstance
return [[self alloc] init];
lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
rjeschke /
Created Sep 11, 2011
Low latency javax.sound.sampled API
package streaming;
import java.util.concurrent.Semaphore;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.Line;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.Mixer;
View ios-8-web-app.html
<!doctype html>
<!-- -->
<title>iOS 8 web app</title>
package com.meetup.adapter;
import android.database.Cursor;
import android.os.Bundle;
public class CursorPagerAdapter<F extends Fragment> extends FragmentStatePagerAdapter {
private final Class<F> fragmentClass;
View Android Check if Service is Running
private boolean isServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)){
if("com.example.MyNeatoIntentService".equals(service.service.getClassName())) {
return true;
return false;
emil2k /
Last active Jan 1, 2020
Android utility class for checking device's network connectivity and speed.
* Copyright (c) 2017 Emil Davtyan
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
TomTasche / AndroidManifest.xml
Last active Sep 19, 2019
OAuth flow using the AccountManager on Android
View AndroidManifest.xml
<!-- ... -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- ... -->
You can’t perform that action at this time.