Skip to content

Instantly share code, notes, and snippets.

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 Apr 27, 2020
[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);
@yasinkuyu
yasinkuyu / daterangepicker.tr.js
Created Jun 30, 2016
Daterangepicker Turkish
View daterangepicker.tr.js
//daterangepicker.js
$(function() {
function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D') + ' - ' + end.format('MMMM D'));
}
cb(moment().subtract(29, 'days'), moment());
$('#reportrange').daterangepicker({
@subfuzion
subfuzion / curl.md
Last active Jul 6, 2020
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@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
You can’t perform that action at this time.