Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Works & stays in office

Akın Özgen akinozgen

👨‍💻
Works & stays in office
Block or report user

Report or block akinozgen

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 install_js_app.sh
apt-get update
apt-get upgrade
apt-get install sudo git build-essential htop apt-transport-https ca-certificates curl gnupg2 software-properties-common # python-software-properties
# apt-get install openjdk-7-jre
# user
useradd -s /bin/bash -m -d /home/akinozgen -c "akinozgen" -g staff akinozgen
gpasswd -a akinozgen sudo
echo "AllowGroups sudo" >> /etc/ssh/sshd_config
passwd akinozgen
View gist:87c63e89a2bfd4cefee24990e4e7ed0e

Install npm module

npm install react-native-maps --save

Top-Level build.gradle

add google() and change classpath com.android.tools.build:gradle:3.0.1

// Top-level build file where you can add configuration options common to all sub-projects/modules.
@danielhaim1
danielhaim1 / twitter-unfollow-all.js
Last active Jul 18, 2017
Mass Unfollow Script (Twitter)
View twitter-unfollow-all.js
// 1. Load https://twitter.com/following entirely
// 2. Run this in console.
[].slice.call(document.querySelectorAll('.unfollow-text')).forEach(function(button) {
button.click();
});
@artiya4u
artiya4u / find_database_size.sql
Created Jan 25, 2017
Query to find database size.
View find_database_size.sql
SELECT sum(round(((data_length + index_length) / 1024 / 1024 / 1024), 2)) AS "Size in GB"
FROM information_schema.TABLES
WHERE table_schema = 'MY_DATABASE'
@vluzrmos
vluzrmos / paginate.php
Created Jul 20, 2016
Laravel Paginate Collection or Array
View paginate.php
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
@gauravat16
gauravat16 / ActivityName.java
Last active Jun 12, 2019
[Android] Add Context Menu to RecyclerView
View ActivityName.java
//Import Statements
public class ActivityName extends AppCompatActivity {
private RecyclerView mRecyclerView;
private RecyclerView.Adapter mAdapter;
private RecyclerView.LayoutManager mLayoutManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ertseyhan
ertseyhan / remount.sh
Created Feb 2, 2016
Temporarily increase size of tmp folder on Arch linux
View remount.sh
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
View install_js_app.sh
apt-get update
apt-get upgrade
apt-get install sudo git build-essential htop apt-transport-https ca-certificates curl gnupg2 software-properties-common # python-software-properties
# apt-get install openjdk-7-jre
# user
useradd -s /bin/bash -m -d /home/eserozvataf -c "eser ozvataf" -g staff eserozvataf
gpasswd -a eserozvataf sudo
echo "AllowGroups sudo" >> /etc/ssh/sshd_config
passwd eserozvataf
@adriengibrat
adriengibrat / Object.prototype.watch.js
Last active Nov 28, 2018
Object.prototype.watch "polyfill"
View Object.prototype.watch.js
/**
* Object.prototype.watch polyfill
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
*
* Known limitations:
* - `delete object[property]` will remove the watchpoint
*
* Based on Eli Grey gist https://gist.github.com/eligrey/384583
* Impovements based on Xose Lluis gist https://gist.github.com/XoseLluis/4750176
* This version is optimized for minification
@JamieMason
JamieMason / unfollow.js
Last active Sep 18, 2019
Unfollow everyone on twitter.com
View unfollow.js
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
(() => {
const followButtonQuery = '[data-testid$="-unfollow"]';
const confirmButtonQuery = '[data-testid="confirmationSheetConfirm"]';
const sleep = ({ seconds }) =>
You can’t perform that action at this time.